My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 年之前
10 年之前
7 年之前
7 年之前
10 年之前
10 年之前
6 年之前
10 年之前
6 年之前
6 年之前
10 年之前
5 年之前
10 年之前
10 年之前
5 年之前
10 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. .Dd Oct 19, 2018
  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 N
  11. .Op Ar -e
  12. .Op Ar -i
  13. .Op Ar -l
  14. .Op Ar -S
  15. .Op Ar -v
  16. .Op Ar -h
  17. .Op Ar PATH
  18. .Sh DESCRIPTION
  19. .Nm
  20. (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, 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.
  21. .Pp
  22. .Nm
  23. opens the current working directory by default if
  24. .Ar PATH
  25. is not specified.
  26. .Sh KEYBINDS
  27. .Pp
  28. .Nm
  29. supports both vi-like and emacs-like key bindings as listed below.
  30. .Pp
  31. NAVIGATION
  32. .Pp
  33. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  34. .It Ic [Up], k, ^P
  35. Move to previous entry
  36. .It Ic [Down], j, ^N
  37. Move to next entry
  38. .It Ic [PgUp], ^U
  39. Scroll up half a page
  40. .It Ic [PgDn], ^D
  41. Scroll down half a page
  42. .It Ic [Home], g, ^, ^A
  43. Move to the first entry
  44. .It Ic [End], G, $, ^E
  45. Move to the last entry
  46. .It Ic [Left], [Backspace], h, ^H
  47. Go to parent directory
  48. .It Ic [Right], [Enter], l, ^M
  49. Open file or enter directory
  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], ^I
  61. Toggle navigate-as-you-type mode
  62. .It Ic b
  63. Pin current directory
  64. .It Ic ^V
  65. Visit pinned directory
  66. .It Ic `, ^/
  67. Leader key
  68. .It Ic LeaderN
  69. Switch to context N
  70. .It Ic Esc
  71. Exit prompt
  72. .It Ic ^L
  73. Force a redraw, clear prompt
  74. .It Ic q
  75. Quit the current context
  76. .It Ic ^G
  77. Quit and change directory
  78. .It Ic Q, ^Q
  79. Quit
  80. .It Ic \&?
  81. Toggle help and settings screen
  82. .El
  83. .Pp
  84. FILES
  85. .Pp
  86. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  87. .It Ic ^O
  88. Open with an application
  89. .It Ic n
  90. Create a new file or directory
  91. .It Ic D
  92. Show entry details
  93. .It Ic d
  94. Toggle detail view
  95. .It Ic ^R
  96. Rename selected entry
  97. .It Ic r
  98. Open directory in vidir
  99. .It Ic ^Y
  100. Toggle selection mode
  101. .It Ic Space, ^K
  102. Copy entry absolute path
  103. .It Ic y
  104. Show selection list
  105. .It Ic ^T
  106. Toggle path quote
  107. .It Ic P
  108. Copy files from selection
  109. .It Ic V
  110. Move files from selection
  111. .It Ic ^X
  112. Delete files from selection
  113. .It Ic X
  114. Delete entry
  115. .It Ic f
  116. Archive entry
  117. .It Ic F
  118. List files in archive
  119. .It Ic ^F
  120. Extract archive in current directory
  121. .It Ic m, M
  122. Show brief/full media info
  123. .It Ic e
  124. Open entry in EDITOR (fallback vi)
  125. .It Ic p
  126. Open entry in PAGER (fallback less)
  127. .El
  128. .Pp
  129. ORDER
  130. .Pp
  131. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  132. .It Ic ^J
  133. Toggle disk usage analyzer mode
  134. .It Ic S
  135. Toggle sort by apparent size
  136. .It Ic s
  137. Toggle sort by file size
  138. .It Ic t
  139. Toggle sort by time modified
  140. .El
  141. .Pp
  142. MISC
  143. .Pp
  144. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  145. .It Ic o
  146. Launch a GUI application
  147. .It Ic \&!, ^]
  148. Spawn SHELL in current directory (fallback sh)
  149. .It Ic R
  150. Run a custom script
  151. .It Ic L
  152. Lock terminal (Linux only)
  153. .El
  154. .Pp
  155. Backing up one directory level will set the cursor position at the
  156. directory you came out of.
  157. .Pp
  158. Help & settings, file details, media info and archive listing are shown in the
  159. PAGER. Please use the PAGER-specific keys in these screens.
  160. .Sh OPTIONS
  161. .Pp
  162. .Nm
  163. supports the following options:
  164. .Pp
  165. .Fl "b key"
  166. specify bookmark key to open
  167. .Pp
  168. .Fl "c N"
  169. specify dir color (default blue), disables if N>7
  170. 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white
  171. .Pp
  172. .Fl e
  173. use exiftool instead of mediainfo
  174. .Pp
  175. .Fl i
  176. start in navigate-as-you-type mode
  177. .Pp
  178. .Fl l
  179. start in light mode (fewer details)
  180. .Pp
  181. .Fl S
  182. start in disk usage analyzer mode
  183. .Pp
  184. .Fl v
  185. show version and exit
  186. .Pp
  187. .Fl h
  188. show program help and exit
  189. .Sh CONFIGURATION
  190. .Nm
  191. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on OS X) as the desktop opener.
  192. .Pp
  193. There is no configuration file. Settings work on environment variables. Please
  194. refer to the ENVIRONMENT section below.
  195. .Pp
  196. Configuring
  197. .Nm
  198. to change to the last visited directory on quit requires shell integration in a
  199. few easy steps. Please visit the project page (linked below) for the
  200. instructions.
  201. .Sh CONTEXTS
  202. Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
  203. are available. The status of the contexts are shown in the top left corner:
  204. .Pp
  205. - the current context is in reverse
  206. .br
  207. - other used contexts are underlined
  208. .br
  209. - rest are unused
  210. .Pp
  211. To switch to a context press the Leader key followed by the context number (1-4).
  212. .Pp
  213. 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.
  214. .Pp
  215. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  216. .Sh FILTERS
  217. Filters support regexes to instantly (search-as-you-type) list the matching
  218. entries in the current directory.
  219. .Pp
  220. Ways to exit filter prompt:
  221. .Pp
  222. (1) press \fI^L\fR to clear filter followed by \fIBksp\fR (to clear the filter symbol, like vi)
  223. .br
  224. - at other prompts \fI^L\fR followed by \fIEnter\fR discards all changes and exits prompt
  225. .br
  226. (2) run a search with no matches and press \fIEnter\fR
  227. .Pp
  228. Common use cases:
  229. .Pp
  230. (1) To list all matches starting with the filter expression, start the expression
  231. with a '^' (caret) symbol.
  232. .br
  233. (2) Type '\\.mkv' to list all MKV files.
  234. .br
  235. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  236. .Pp
  237. If
  238. .Nm
  239. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  240. .Pp
  241. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  242. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  243. .br
  244. In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  245. .Sh SELECTION MODE
  246. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  247. NNN_COPIER is set (see ENVIRONMENT section below).
  248. .Pp
  249. To copy multiple file paths the selection mode should be enabled using \fI^Y\fR.
  250. In this mode it's possible to
  251. .Pp
  252. (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry; or,
  253. .br
  254. (2) navigate to another file in the same directory to select a range of files.
  255. .Pp
  256. Pressing \fI^Y\fR again copies the paths and exits the selection mode. The files in the list can now
  257. be copied, moved or removed using respective keyboard shortcuts.
  258. .Pp
  259. To list the file paths copied to memory press \fIy\fR.
  260. .Sh ENVIRONMENT
  261. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  262. when dealing with the !, e and p commands respectively.
  263. .Pp
  264. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
  265. \fI;\fR:
  266. .Bd -literal
  267. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  268. NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.
  269. .Ed
  270. .Pp
  271. \fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
  272. files.
  273. .Bd -literal
  274. export NNN_USE_EDITOR=1
  275. .Ed
  276. .Pp
  277. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker.
  278. .Pp
  279. \fBNNN_COPIER:\fR set to a clipboard copier script. For example, on Linux:
  280. .Bd -literal
  281. -------------------------------------
  282. #!/bin/sh
  283. # comment the next line to convert newlines to spaces
  284. IFS=
  285. echo -n $1 | xsel --clipboard --input
  286. -------------------------------------
  287. If it's not set, by default file paths are copied to the tmp file \fBDIR/.nnncp\fR, where 'DIR' (by priority) is: \fI$HOME\fR or, \fI$TMPDIR\fR or, \fI/tmp\fR.
  288. .Ed
  289. .Pp
  290. \fBNNN_QUOTE_ON:\fR wrap copied paths within single quotes. Useful for pasting
  291. names in the shell. Note that the filename is not escaped. So copying may still fail
  292. for filenames having quote(s) in them.
  293. .Pp
  294. \fBNNN_SCRIPT:\fR path to a custom script to invoke with currently selected file name as argument 1.
  295. .Bd -literal
  296. export NNN_SCRIPT=/usr/local/bin/nscript
  297. .Ed
  298. .Pp
  299. \fBNNN_MULTISCRIPT:\fR run multiple custom scripts.
  300. .Bd -literal
  301. export NNN_MULTISCRIPT=1
  302. .Ed
  303. .Pp
  304. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  305. .Bd -literal
  306. export NNN_SHOW_HIDDEN=1
  307. .Ed
  308. .Pp
  309. \fBNNN_NO_AUTOSELECT:\fR Disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  310. .Bd -literal
  311. export export NNN_NO_AUTOSELECT=1
  312. .Ed
  313. .Sh KNOWN ISSUES
  314. If you are using urxvt you might have to set backspace key to DEC.
  315. .Sh AUTHORS
  316. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  317. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  318. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  319. .Sh HOME
  320. .Em https://github.com/jarun/nnn