My build of nnn with minor changes
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

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