My build of nnn with minor changes
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.
 
 
 
 
 
 

364 líneas
9.9 KiB

  1. .Dd Feb 19, 2019
  2. .Dt NNN 1
  3. .Os
  4. .Sh NAME
  5. .Nm nnn
  6. .Nd the missing terminal file manager for X
  7. .Sh SYNOPSIS
  8. .Nm
  9. .Op Ar -b key
  10. .Op Ar -C
  11. .Op Ar -e
  12. .Op Ar -i
  13. .Op Ar -l
  14. .Op Ar -n
  15. .Op Ar -p file
  16. .Op Ar -s
  17. .Op Ar -S
  18. .Op Ar -v
  19. .Op Ar -w
  20. .Op Ar -h
  21. .Op Ar PATH
  22. .Sh DESCRIPTION
  23. .Nm
  24. (Noice is Not Noice) is a performance-optimized, feature-packed fork of noice (http://git.2f30.org/noice/) with seamless desktop integration, simplified navigation, \fInavigate-as-you-type\fR mode with auto select, disk usage analyzer mode, bookmarks, contexts, application launcher, familiar navigation shortcuts, subshell spawning and much more. It remains a simple and efficient file manager that stays out of your way.
  25. .Pp
  26. .Nm
  27. opens the current working directory by default if
  28. .Ar PATH
  29. is not specified.
  30. .Sh KEYBINDS
  31. .Pp
  32. NAVIGATION
  33. .Pp
  34. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  35. .It Ic [Up], k
  36. Move to previous entry
  37. .It Ic [Down], j
  38. Move to next entry
  39. .It Ic [Left], h
  40. Go to parent directory
  41. .It Ic [Right], [Enter], l
  42. Open file or enter directory
  43. .It Ic [PgUp], ^U
  44. Scroll up half a page
  45. .It Ic [PgDn], ^D
  46. Scroll down half a page
  47. .It Ic [Home], g, ^A
  48. Move to the first entry
  49. .It Ic [End], G, ^E
  50. Move to the last entry
  51. .It Ic ~
  52. Change to the HOME directory
  53. .It Ic &
  54. Change to initial directory
  55. .It Ic \-
  56. Change to the last visited directory
  57. .It Ic \&.
  58. Toggle show hidden . (dot) files
  59. .It Ic /
  60. Change filter (more information below)
  61. .It Ic [Insert], ^T
  62. Toggle navigate-as-you-type mode
  63. .It Ic b
  64. Pin current directory
  65. .It Ic ^B
  66. Visit pinned directory
  67. .It Ic d
  68. Toggle detail view
  69. .It Ic Tab, ^I
  70. Next context, ask to create if none
  71. .It Ic ,, ^/
  72. Leader key
  73. .It Ic N, LeaderN
  74. Switch to context N
  75. .It Ic Esc
  76. Exit prompt
  77. .It Ic ^L
  78. Force a redraw, clear prompt
  79. .It Ic q
  80. Quit the current context
  81. .It Ic ^G
  82. Quit and change directory
  83. .It Ic Q, ^Q
  84. Quit
  85. .It Ic \&?
  86. Help and configuration screen
  87. .El
  88. .Pp
  89. FILES
  90. .Pp
  91. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  92. .It Ic ^O
  93. Open with an application (takes 1 combined argument)
  94. .It Ic n
  95. Create a new file, directory or link(s) to selection
  96. .It Ic D
  97. Show entry details
  98. .It Ic ^R
  99. Rename selected entry
  100. .It Ic r
  101. Open directory in vidir
  102. .It Ic K, ^Y
  103. Toggle selection mode
  104. .It Ic Y
  105. Select all entries in dir
  106. .It Ic Space, ^K
  107. Select entry and copy absolute path
  108. .It Ic y
  109. Show selection list
  110. .It Ic P
  111. Copy files from selection
  112. .It Ic V
  113. Move files from selection
  114. .It Ic X
  115. Delete files from selection
  116. .It Ic ^X
  117. Delete entry
  118. .It Ic f
  119. Archive files
  120. .It Ic F
  121. List files in archive
  122. .It Ic ^F
  123. Extract archive in current directory
  124. .It Ic m, M
  125. Show brief/full media info
  126. .It Ic e
  127. Open entry in EDITOR (fallback vi)
  128. .It Ic p
  129. Open entry in PAGER (fallback less)
  130. .El
  131. .Pp
  132. ORDER TOGGLES
  133. .Pp
  134. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  135. .It Ic ^J
  136. Toggle disk usage analyzer mode
  137. .It Ic S
  138. Toggle sort by apparent size
  139. .It Ic ^W
  140. Wild mode
  141. .It Ic t
  142. Toggle sort by time modified
  143. .It Ic s
  144. Toggle sort by file size
  145. .El
  146. .Pp
  147. MISC
  148. .Pp
  149. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  150. .It Ic \&!, ^]
  151. Spawn SHELL in current directory (fallback sh)
  152. .It Ic C
  153. Execute entry
  154. .It Ic R, ^V
  155. Run or pick a script to run
  156. .It Ic L
  157. Lock terminal
  158. .It Ic ^N
  159. Take note
  160. .It Ic ^P
  161. Show command prompt
  162. .El
  163. .Pp
  164. Backing up one directory level will set the cursor position at the
  165. directory you came out of.
  166. .Pp
  167. Help & settings, file details, media info and archive listing are shown in the
  168. PAGER. Please use the PAGER-specific keys in these screens.
  169. .Sh OPTIONS
  170. .Pp
  171. .Nm
  172. supports the following options:
  173. .Pp
  174. .Fl "b key"
  175. specify bookmark key to open
  176. .Pp
  177. .Fl C
  178. disable directory color
  179. .Pp
  180. .Fl e
  181. use exiftool instead of mediainfo
  182. .Pp
  183. .Fl i
  184. start in navigate-as-you-type mode
  185. .Pp
  186. .Fl l
  187. start in light mode (fewer details)
  188. .Pp
  189. .Fl n
  190. use version compare to sort files
  191. .Pp
  192. .Fl "p file"
  193. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  194. .Pp
  195. .Fl s
  196. use substring match for filters instead of regex
  197. .Pp
  198. .Fl S
  199. start in disk usage analyzer mode
  200. .Pp
  201. .Fl v
  202. show version and exit
  203. .Pp
  204. .Fl w
  205. wild mode - entries unsorted on directory load
  206. .Pp
  207. .Fl h
  208. show program help and exit
  209. .Sh CONFIGURATION
  210. .Nm
  211. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on macOS) as the desktop opener.
  212. .Pp
  213. There is no configuration file. Settings work on environment variables. Please
  214. refer to the ENVIRONMENT section below.
  215. .Pp
  216. Configuring
  217. .Nm
  218. to change to the last visited directory on quit requires shell integration in a
  219. few easy steps. Please visit the project page (linked below) for the
  220. instructions.
  221. .Sh CONTEXTS
  222. Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
  223. are available. The status of the contexts are shown in the top left corner:
  224. .Pp
  225. - the current context is in reverse
  226. .br
  227. - other used contexts are underlined
  228. .br
  229. - rest are unused
  230. .Pp
  231. To switch to a context press the Leader key followed by the context number (1-4).
  232. .Pp
  233. The first time a context is entered, it copies the state of the last visited context. Each context remembers its start directory and last visited directory.
  234. .Pp
  235. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  236. .Sh FILTERS
  237. Filters support regexes by default to instantly (search-as-you-type) list the matching
  238. entries in the current directory.
  239. .Pp
  240. Common use cases:
  241. .Pp
  242. (1) To list all matches starting with the filter expression, start the expression
  243. with a '^' (caret) symbol.
  244. .br
  245. (2) Type '\\.mkv' to list all MKV files.
  246. .br
  247. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  248. .Pp
  249. There is a program option to filter entries by substring match.
  250. .Pp
  251. If
  252. .Nm
  253. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  254. .Pp
  255. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  256. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  257. .br
  258. In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  259. .br
  260. The \fIwild mode\fR can be handy for users who use the \fInavigate-as-you-type\fR mode constantly. The entries are unsorted when the directory loads. Applying filters sort the entries (with directories on top). Directory color is disabled in this mode.
  261. .Sh SELECTION MODE
  262. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  263. NNN_COPIER is set (see ENVIRONMENT section below).
  264. .Pp
  265. To select multiple files the selection mode should be enabled using \fI^Y\fR.
  266. In this mode it's possible to
  267. .Pp
  268. (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
  269. .br
  270. (2) navigate to another file in the same directory to select a range of files.
  271. .Pp
  272. Pressing \fI^Y\fR again saves the selection to the list and exits the selection mode.
  273. The files in the list can now be copied, moved or removed using respective keyboard shortcuts.
  274. .Pp
  275. To list the selected files press \fIy\fR.
  276. .Sh ENVIRONMENT
  277. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  278. when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
  279. .Pp
  280. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
  281. \fI;\fR:
  282. .Bd -literal
  283. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  284. NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.
  285. .Ed
  286. .Pp
  287. \fBNNN_OPENER:\fR specify a custom file opener.
  288. .Bd -literal
  289. export NNN_OPENER=mimeopen
  290. .Ed
  291. .Pp
  292. \fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
  293. .Bd -literal
  294. export NNN_CONTEXT_COLORS='1234'
  295. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  296. .Ed
  297. .Pp
  298. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
  299. .Pp
  300. \fBNNN_COPIER:\fR system clipboard copier script.
  301. .Bd -literal
  302. NOTE: File paths are copied to the tmp file \fBDIR/.nnncp\fR, where 'DIR' (by priority) is:
  303. \fI$HOME\fR or, \fI$TMPDIR\fR or, \fI/tmp\fR.
  304. The path is shown in the help and configuration screen.
  305. .Ed
  306. .Pp
  307. \fBNNN_SCRIPT:\fR \fIabsolute\fR path to a directory to select a script from or a single script to invoke with currently selected file name as argument 1.
  308. .Bd -literal
  309. export NNN_SCRIPT=/home/user/scripts
  310. OR
  311. export NNN_SCRIPT=/usr/local/bin/nscript.sh
  312. .Ed
  313. .Pp
  314. \fBNNN_NOTE:\fR \fIabsolute\fR path to a note file.
  315. .Bd -literal
  316. export NNN_NOTE='/home/user/.mynotes'
  317. .Ed
  318. .Pp
  319. \fBNNN_TMPFILE:\fR when cd on quit is pressed, the absolute path of the current open directory is written to this file. A wrapper script can read this file and cd into it once the program quits.
  320. .Bd -literal
  321. export NNN_TMPFILE=/tmp/nnn
  322. .Ed
  323. .Pp
  324. \fBNNN_USE_EDITOR:\fR use EDITOR (VISUAL takes preference, preferably CLI, fallback vi) to handle text
  325. files.
  326. .Bd -literal
  327. export NNN_USE_EDITOR=1
  328. .Ed
  329. .Pp
  330. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  331. .Bd -literal
  332. export NNN_SHOW_HIDDEN=1
  333. .Ed
  334. .Pp
  335. \fBNNN_NO_AUTOSELECT:\fR disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  336. .Bd -literal
  337. export NNN_NO_AUTOSELECT=1
  338. .Ed
  339. .Pp
  340. \fBNNN_RESTRICT_NAV_OPEN:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files).
  341. .Bd -literal
  342. export NNN_RESTRICT_NAV_OPEN=1
  343. .Ed
  344. .Pp
  345. \fBNNN_RESTRICT_0B:\fR restrict opening 0-byte files due to unexpected behaviour; use \fIedit\fR or \fIopen with\fR to open the file.
  346. .Bd -literal
  347. export NNN_RESTRICT_0B=1
  348. .Ed
  349. .Pp
  350. \fBNNN_CP_MV_PROG:\fR show progress of copy, move operations (Linux-only, needs advcpmv).
  351. .Bd -literal
  352. export NNN_CP_MV_PROG=1
  353. .Ed
  354. .Sh KNOWN ISSUES
  355. If you are using urxvt you might have to set backspace key to DEC.
  356. .Sh AUTHORS
  357. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  358. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  359. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  360. .Sh HOME
  361. .Em https://github.com/jarun/nnn