My build of nnn with minor changes
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

351 lines
9.4 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 -C
  11. .Op Ar -e
  12. .Op Ar -i
  13. .Op Ar -l
  14. .Op Ar -n
  15. .Op Ar -p file
  16. .Op Ar -s
  17. .Op Ar -S
  18. .Op Ar -v
  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. Open directory in vidir
  101. .It Ic Y, ^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 t
  139. Toggle sort by time modified
  140. .It Ic s
  141. Toggle sort by file size
  142. .El
  143. .Pp
  144. MISC
  145. .Pp
  146. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  147. .It Ic \&!, ^]
  148. Spawn SHELL in current directory (fallback sh)
  149. .It Ic C
  150. Execute entry
  151. .It Ic R, ^V
  152. Run or pick a script to run
  153. .It Ic L
  154. Lock terminal
  155. .It Ic ^N
  156. Take note
  157. .It Ic ^P
  158. Show command prompt
  159. .El
  160. .Pp
  161. Backing up one directory level will set the cursor position at the
  162. directory you came out of.
  163. .Pp
  164. Help & settings, file details, media info and archive listing are shown in the
  165. PAGER. Please use the PAGER-specific keys in these screens.
  166. .Sh OPTIONS
  167. .Pp
  168. .Nm
  169. supports the following options:
  170. .Pp
  171. .Fl "b key"
  172. specify bookmark key to open
  173. .Pp
  174. .Fl C
  175. disable directory color
  176. .Pp
  177. .Fl e
  178. use exiftool instead of mediainfo
  179. .Pp
  180. .Fl i
  181. start in navigate-as-you-type mode
  182. .Pp
  183. .Fl l
  184. start in light mode (fewer details)
  185. .Pp
  186. .Fl n
  187. use version compare to sort files
  188. .Pp
  189. .Fl "p file"
  190. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  191. .Pp
  192. .Fl s
  193. use substring match for filters instead of regex
  194. .Pp
  195. .Fl S
  196. start in disk usage analyzer mode
  197. .Pp
  198. .Fl v
  199. show version and exit
  200. .Pp
  201. .Fl h
  202. show program help and exit
  203. .Sh CONFIGURATION
  204. .Nm
  205. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on macOS) as the desktop opener.
  206. .Pp
  207. There is no configuration file. Settings work on environment variables. Please
  208. refer to the ENVIRONMENT section below.
  209. .Pp
  210. Configuring
  211. .Nm
  212. to change to the last visited directory on quit requires shell integration in a
  213. few easy steps. Please visit the project page (linked below) for the
  214. instructions.
  215. .Sh CONTEXTS
  216. Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
  217. are available. The status of the contexts are shown in the top left corner:
  218. .Pp
  219. - the current context is in reverse
  220. .br
  221. - other used contexts are underlined
  222. .br
  223. - rest are unused
  224. .Pp
  225. To switch to a context press the Leader key followed by the context number (1-4).
  226. .Pp
  227. 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.
  228. .Pp
  229. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  230. .Sh FILTERS
  231. Filters support regexes by default to instantly (search-as-you-type) list the matching
  232. entries in the current directory.
  233. .Pp
  234. Common use cases:
  235. .Pp
  236. (1) To list all matches starting with the filter expression, start the expression
  237. with a '^' (caret) symbol.
  238. .br
  239. (2) Type '\\.mkv' to list all MKV files.
  240. .br
  241. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  242. .Pp
  243. There is a program option to filter entries by substring match.
  244. .Pp
  245. If
  246. .Nm
  247. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  248. .Pp
  249. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  250. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  251. .br
  252. In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  253. .Sh SELECTION MODE
  254. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  255. NNN_COPIER is set (see ENVIRONMENT section below).
  256. .Pp
  257. To select multiple files the selection mode should be enabled using \fI^Y\fR.
  258. In this mode it's possible to
  259. .Pp
  260. (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
  261. .br
  262. (2) navigate to another file in the same directory to select a range of files.
  263. .Pp
  264. Pressing \fI^Y\fR again saves the selection to the list and exits the selection mode.
  265. The files in the list can now be copied, moved or removed using respective keyboard shortcuts.
  266. .Pp
  267. To list the selected files press \fIy\fR.
  268. .Sh ENVIRONMENT
  269. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  270. when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
  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_OPENER:\fR specify a custom file opener.
  280. .Bd -literal
  281. export NNN_OPENER=mimeopen
  282. .Ed
  283. .Pp
  284. \fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
  285. .Bd -literal
  286. export NNN_CONTEXT_COLORS='1234'
  287. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  288. .Ed
  289. .Pp
  290. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
  291. .Pp
  292. \fBNNN_COPIER:\fR system clipboard copier script.
  293. .Bd -literal
  294. NOTE: File paths are copied to the tmp file \fBDIR/.nnncp\fR, where 'DIR' (by priority) is:
  295. \fI$HOME\fR or, \fI$TMPDIR\fR or, \fI/tmp\fR.
  296. The path is shown in the help and configuration screen.
  297. .Ed
  298. .Pp
  299. \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.
  300. .Bd -literal
  301. export NNN_SCRIPT=/home/user/scripts
  302. OR
  303. export NNN_SCRIPT=/usr/local/bin/nscript.sh
  304. .Ed
  305. .Pp
  306. \fBNNN_NOTE:\fR \fIabsolute\fR path to a note file.
  307. .Bd -literal
  308. export NNN_NOTE='/home/user/.mynotes'
  309. .Ed
  310. .Pp
  311. \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.
  312. .Bd -literal
  313. export NNN_TMPFILE=/tmp/nnn
  314. .Ed
  315. .Pp
  316. \fBNNN_USE_EDITOR:\fR use EDITOR (VISUAL takes preference, preferably CLI, fallback vi) to handle text
  317. files.
  318. .Bd -literal
  319. export NNN_USE_EDITOR=1
  320. .Ed
  321. .Pp
  322. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  323. .Bd -literal
  324. export NNN_SHOW_HIDDEN=1
  325. .Ed
  326. .Pp
  327. \fBNNN_NO_AUTOSELECT:\fR disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  328. .Bd -literal
  329. export NNN_NO_AUTOSELECT=1
  330. .Ed
  331. .Pp
  332. \fBNNN_RESTRICT_NAV_OPEN:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files).
  333. .Bd -literal
  334. export NNN_RESTRICT_NAV_OPEN=1
  335. .Ed
  336. .Pp
  337. \fBNNN_RESTRICT_0B:\fR restrict opening 0-byte files due to unexpected behaviour; use \fIedit\fR or \fIopen with\fR to open the file.
  338. .Bd -literal
  339. export NNN_RESTRICT_0B=1
  340. .Ed
  341. .Sh KNOWN ISSUES
  342. If you are using urxvt you might have to set backspace key to DEC.
  343. .Sh AUTHORS
  344. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  345. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  346. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  347. .Sh HOME
  348. .Em https://github.com/jarun/nnn