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.
 
 
 
 
 
 

331 lines
8.9 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. .Nm
  30. supports both vi-like and emacs-like key bindings as listed below.
  31. .Pp
  32. NAVIGATION
  33. .Pp
  34. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  35. .It Ic [Up], k, ^P
  36. Move to previous entry
  37. .It Ic [Down], j, ^N
  38. Move to next entry
  39. .It Ic [PgUp], ^U
  40. Scroll up half a page
  41. .It Ic [PgDn], ^D
  42. Scroll down half a page
  43. .It Ic [Home], g, ^, ^A
  44. Move to the first entry
  45. .It Ic [End], G, $, ^E
  46. Move to the last entry
  47. .It Ic [Left], [Backspace], h, ^H
  48. Go to parent directory
  49. .It Ic [Right], [Enter], l, ^M
  50. Open file or enter directory
  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 ^W
  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 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 or directory
  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 Y, ^Y
  103. Toggle selection mode
  104. .It Ic Space, ^K
  105. Copy entry absolute path
  106. .It Ic y
  107. Show selection list
  108. .It Ic P
  109. Copy files from selection
  110. .It Ic V
  111. Move files from selection
  112. .It Ic X
  113. Delete files from selection
  114. .It Ic ^X
  115. Delete entry
  116. .It Ic f
  117. Archive entry
  118. .It Ic F
  119. List files in archive
  120. .It Ic ^F
  121. Extract archive in current directory
  122. .It Ic m, M
  123. Show brief/full media info
  124. .It Ic e
  125. Open entry in EDITOR (fallback vi)
  126. .It Ic p
  127. Open entry in PAGER (fallback less)
  128. .El
  129. .Pp
  130. ORDER TOGGLES
  131. .Pp
  132. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  133. .It Ic ^J
  134. Toggle disk usage analyzer mode
  135. .It Ic S
  136. Toggle sort by apparent size
  137. .It Ic t
  138. Toggle sort by time modified
  139. .It Ic s
  140. Toggle sort by file size
  141. .El
  142. .Pp
  143. MISC
  144. .Pp
  145. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  146. .It Ic \&!, ^]
  147. Spawn SHELL in current directory (fallback sh)
  148. .It Ic C
  149. Execute entry
  150. .It Ic R
  151. Run or choose a custom script
  152. .It Ic L
  153. Lock terminal
  154. .It Ic ^S
  155. Run a command
  156. .El
  157. .Pp
  158. Backing up one directory level will set the cursor position at the
  159. directory you came out of.
  160. .Pp
  161. Help & settings, file details, media info and archive listing are shown in the
  162. PAGER. Please use the PAGER-specific keys in these screens.
  163. .Sh OPTIONS
  164. .Pp
  165. .Nm
  166. supports the following options:
  167. .Pp
  168. .Fl "b key"
  169. specify bookmark key to open
  170. .Pp
  171. .Fl C
  172. disable directory color
  173. .Pp
  174. .Fl e
  175. use exiftool instead of mediainfo
  176. .Pp
  177. .Fl i
  178. start in navigate-as-you-type mode
  179. .Pp
  180. .Fl l
  181. start in light mode (fewer details)
  182. .Pp
  183. .Fl "p file"
  184. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  185. .Pp
  186. .Fl S
  187. start in disk usage analyzer mode
  188. .Pp
  189. .Fl v
  190. show version and exit
  191. .Pp
  192. .Fl h
  193. show program help and exit
  194. .Sh CONFIGURATION
  195. .Nm
  196. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on macOS) as the desktop opener.
  197. .Pp
  198. There is no configuration file. Settings work on environment variables. Please
  199. refer to the ENVIRONMENT section below.
  200. .Pp
  201. Configuring
  202. .Nm
  203. to change to the last visited directory on quit requires shell integration in a
  204. few easy steps. Please visit the project page (linked below) for the
  205. instructions.
  206. .Sh CONTEXTS
  207. Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
  208. are available. The status of the contexts are shown in the top left corner:
  209. .Pp
  210. - the current context is in reverse
  211. .br
  212. - other used contexts are underlined
  213. .br
  214. - rest are unused
  215. .Pp
  216. To switch to a context press the Leader key followed by the context number (1-4).
  217. .Pp
  218. 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.
  219. .Pp
  220. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  221. .Sh FILTERS
  222. Filters support regexes to instantly (search-as-you-type) list the matching
  223. entries in the current directory.
  224. .Pp
  225. Ways to exit filter prompt:
  226. .Pp
  227. (1) press \fI^L\fR to clear filter followed by \fIBksp\fR (to clear the filter symbol, like vi)
  228. .br
  229. - at other prompts \fI^L\fR followed by \fIEnter\fR discards all changes and exits prompt
  230. .br
  231. (2) run a search with no matches and press \fIEnter\fR
  232. .Pp
  233. Common use cases:
  234. .Pp
  235. (1) To list all matches starting with the filter expression, start the expression
  236. with a '^' (caret) symbol.
  237. .br
  238. (2) Type '\\.mkv' to list all MKV files.
  239. .br
  240. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  241. .Pp
  242. If
  243. .Nm
  244. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  245. .Pp
  246. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  247. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  248. .br
  249. In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  250. .Sh SELECTION MODE
  251. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  252. NNN_COPIER is set (see ENVIRONMENT section below).
  253. .Pp
  254. To copy multiple file paths the selection mode should be enabled using \fI^Y\fR.
  255. In this mode it's possible to
  256. .Pp
  257. (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
  258. .br
  259. (2) navigate to another file in the same directory to select a range of files.
  260. .Pp
  261. Pressing \fI^Y\fR again copies the paths and exits the selection mode. The files in the list can now
  262. be copied, moved or removed using respective keyboard shortcuts.
  263. .Pp
  264. To list the file paths copied to memory press \fIy\fR.
  265. .Sh ENVIRONMENT
  266. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  267. when dealing with the !, e and p commands respectively. A single combination to arguments is supported, e.g.:
  268. .Bd -literal
  269. export EDITOR='vim -xR'
  270. .Ed
  271. .Pp
  272. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
  273. \fI;\fR:
  274. .Bd -literal
  275. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  276. NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.
  277. .Ed
  278. .Pp
  279. \fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
  280. files.
  281. .Bd -literal
  282. export NNN_USE_EDITOR=1
  283. .Ed
  284. .Pp
  285. \fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
  286. .Bd -literal
  287. export NNN_CONTEXT_COLORS="1234"
  288. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  289. .Ed
  290. .Pp
  291. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
  292. .Pp
  293. \fBNNN_COPIER:\fR set to a clipboard copier script.
  294. .Bd -literal
  295. NOTE: By default file paths are copied to the tmp file \fBDIR/.nnncp\fR, where 'DIR' (by priority) is:
  296. \fI$HOME\fR or, \fI$TMPDIR\fR or, \fI/tmp\fR.
  297. The path is shown in the help and configuration screen.
  298. .Ed
  299. .Pp
  300. \fBNNN_SCRIPT:\fR absolute path to a directory to select a script from or a single script to invoke with currently selected file name as argument 1.
  301. .Bd -literal
  302. export NNN_SCRIPT=/home/user/scripts
  303. OR
  304. export NNN_SCRIPT=/usr/local/bin/nscript.sh
  305. .Ed
  306. .Pp
  307. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  308. .Bd -literal
  309. export NNN_SHOW_HIDDEN=1
  310. .Ed
  311. .Pp
  312. \fBNNN_NO_AUTOSELECT:\fR disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  313. .Bd -literal
  314. export NNN_NO_AUTOSELECT=1
  315. .Ed
  316. .Pp
  317. \fBDISABLE_FILE_OPEN_ON_NAV:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files).
  318. .Bd -literal
  319. export DISABLE_FILE_OPEN_ON_NAV=1
  320. .Ed
  321. .Sh KNOWN ISSUES
  322. If you are using urxvt you might have to set backspace key to DEC.
  323. .Sh AUTHORS
  324. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  325. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  326. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  327. .Sh HOME
  328. .Em https://github.com/jarun/nnn