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.

пре 6 година
пре 10 година
пре 6 година
пре 10 година
пре 7 година
пре 7 година
пре 7 година
пре 6 година
пре 7 година
пре 5 година
пре 7 година
пре 10 година
пре 10 година
пре 7 година
пре 7 година
пре 6 година
пре 6 година
пре 10 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 7 година
пре 7 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 7 година
пре 7 година
пре 6 година
пре 7 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 7 година
пре 6 година
пре 6 година
пре 7 година
пре 6 година
пре 5 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 5 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 5 година
пре 6 година
пре 7 година
пре 7 година
пре 7 година
пре 6 година
пре 7 година
пре 7 година
пре 5 година
пре 7 година
пре 10 година
пре 6 година
пре 7 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 10 година
пре 10 година
пре 6 година
пре 7 година
пре 5 година
пре 6 година
пре 5 година
пре 6 година
пре 9 година
пре 6 година
пре 8 година
пре 6 година
пре 7 година
пре 6 година
пре 7 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 6 година
пре 5 година
пре 5 година
пре 10 година
пре 6 година
пре 10 година
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  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. .It Ic T
  162. Empty trash
  163. .El
  164. .Pp
  165. Backing up one directory level will set the cursor position at the
  166. directory you came out of.
  167. .Pp
  168. Help & settings, file details, media info and archive listing are shown in the
  169. PAGER. Please use the PAGER-specific keys in these screens.
  170. .Sh OPTIONS
  171. .Pp
  172. .Nm
  173. supports the following options:
  174. .Pp
  175. .Fl "b key"
  176. specify bookmark key to open
  177. .Pp
  178. .Fl e
  179. use exiftool instead of mediainfo
  180. .Pp
  181. .Fl i
  182. start in navigate-as-you-type mode
  183. .Pp
  184. .Fl l
  185. start in light mode (fewer details)
  186. .Pp
  187. .Fl n
  188. use version compare to sort files
  189. .Pp
  190. .Fl "p file"
  191. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  192. .Pp
  193. .Fl s
  194. use substring match for filters instead of regex
  195. .Pp
  196. .Fl S
  197. start in disk usage analyzer mode
  198. .Pp
  199. .Fl v
  200. show version and exit
  201. .Pp
  202. .Fl w
  203. wild mode - entries unsorted on directory load
  204. .Pp
  205. .Fl h
  206. show program help and exit
  207. .Sh CONFIGURATION
  208. .Nm
  209. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on macOS) as the desktop opener.
  210. .Pp
  211. There is no configuration file. Settings work on environment variables. Please
  212. refer to the ENVIRONMENT section below.
  213. .Pp
  214. Configuring
  215. .Nm
  216. to change to the last visited directory on quit requires shell integration in a
  217. few easy steps. Please visit the project page (linked below) for the
  218. instructions.
  219. .Sh CONTEXTS
  220. Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
  221. are available. The status of the contexts are shown in the top left corner:
  222. .Pp
  223. - the current context is in reverse
  224. .br
  225. - other used contexts are underlined
  226. .br
  227. - rest are unused
  228. .Pp
  229. To switch to a context press the Leader key followed by the context number (1-4).
  230. .Pp
  231. The first time a context is entered, it copies the state of the last visited context. Each context remembers its last visited directory.
  232. .Pp
  233. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  234. .Sh FILTERS
  235. Filters support regexes by default to instantly (search-as-you-type) list the matching
  236. entries in the current directory.
  237. .Pp
  238. Common use cases:
  239. .Pp
  240. (1) To list all matches starting with the filter expression, start the expression
  241. with a '^' (caret) symbol.
  242. .br
  243. (2) Type '\\.mkv' to list all MKV files.
  244. .br
  245. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  246. .Pp
  247. There is a program option to filter entries by substring match.
  248. .Pp
  249. If
  250. .Nm
  251. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  252. .Pp
  253. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  254. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  255. .br
  256. In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  257. .br
  258. 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.
  259. .Sh SELECTION MODE
  260. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  261. NNN_COPIER is set (see ENVIRONMENT section below).
  262. .Pp
  263. To select multiple files the selection mode should be enabled using \fI^Y\fR.
  264. In this mode it's possible to
  265. .Pp
  266. (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
  267. .br
  268. (2) navigate to another file in the same directory to select a range of files.
  269. .Pp
  270. Press \fI^Y\fR again to save the selection and exit selection mode.
  271. .Pp
  272. Selected files are visually indicated by a \fB+\fR.
  273. .br
  274. The files in the list can now be copied, moved or removed using respective keyboard shortcuts.
  275. .Pp
  276. To list the selected files press \fIy\fR.
  277. .Sh ENVIRONMENT
  278. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  279. when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
  280. .Pp
  281. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
  282. \fI;\fR:
  283. .Bd -literal
  284. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  285. NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.
  286. .Ed
  287. .Pp
  288. \fBNNN_OPENER:\fR specify a custom file opener.
  289. .Bd -literal
  290. export NNN_OPENER=mimeopen
  291. .Ed
  292. .Pp
  293. \fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
  294. .Bd -literal
  295. export NNN_CONTEXT_COLORS='1234'
  296. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  297. .Ed
  298. .Pp
  299. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
  300. .Pp
  301. \fBNNN_COPIER:\fR system clipboard copier script.
  302. .Bd -literal
  303. NOTE: File paths are copied to the tmp file \fBDIR/.nnncp\fR, where 'DIR' (by priority) is:
  304. \fI$HOME\fR or, \fI$TMPDIR\fR or, \fI/tmp\fR.
  305. The path is shown in the help and configuration screen.
  306. .Ed
  307. .Pp
  308. \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.
  309. .Bd -literal
  310. export NNN_SCRIPT=/home/user/scripts
  311. OR
  312. export NNN_SCRIPT=/usr/local/bin/nscript.sh
  313. .Ed
  314. .Pp
  315. \fBNNN_NOTE:\fR \fIabsolute\fR path to a note file.
  316. .Bd -literal
  317. export NNN_NOTE='/home/user/.mynotes'
  318. .Ed
  319. .Pp
  320. \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.
  321. .Bd -literal
  322. export NNN_TMPFILE=/tmp/nnn
  323. .Ed
  324. .Pp
  325. \fBNNN_USE_EDITOR:\fR use EDITOR (VISUAL takes preference, preferably CLI, fallback vi) to handle text
  326. files.
  327. .Bd -literal
  328. export NNN_USE_EDITOR=1
  329. .Ed
  330. .Pp
  331. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  332. .Bd -literal
  333. export NNN_SHOW_HIDDEN=1
  334. .Ed
  335. .Pp
  336. \fBNNN_NO_AUTOSELECT:\fR disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  337. .Bd -literal
  338. export NNN_NO_AUTOSELECT=1
  339. .Ed
  340. .Pp
  341. \fBNNN_RESTRICT_NAV_OPEN:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files).
  342. .Bd -literal
  343. export NNN_RESTRICT_NAV_OPEN=1
  344. .Ed
  345. .Pp
  346. \fBNNN_RESTRICT_0B:\fR restrict opening 0-byte files due to unexpected behaviour; use \fIedit\fR or \fIopen with\fR to open the file.
  347. .Bd -literal
  348. export NNN_RESTRICT_0B=1
  349. .Ed
  350. .Pp
  351. \fBNNN_TRASH:\fR move files to \fB~/.local/trash\fR on delete.
  352. .Bd -literal
  353. export NNN_TRASH=1
  354. .Ed
  355. .Pp
  356. \fBNNN_CP_MV_PROG:\fR show progress of copy, move operations (Linux-only, needs advcpmv).
  357. .Bd -literal
  358. export NNN_CP_MV_PROG=1
  359. .Ed
  360. .Sh KNOWN ISSUES
  361. If you are using urxvt you might have to set backspace key to DEC.
  362. .Sh AUTHORS
  363. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  364. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  365. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  366. .Sh HOME
  367. .Em https://github.com/jarun/nnn