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.
 
 
 
 
 
 

346 lines
9.4 KiB

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