My build of nnn with minor changes
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

336 строки
8.9 KiB

  1. .Dd Nov 23, 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 -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, 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], ^I
  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 ^B
  68. Next active context
  69. .It Ic `, ^/
  70. Leader key
  71. .It Ic LeaderN
  72. Switch to context N
  73. .It Ic Esc
  74. Exit prompt
  75. .It Ic ^L
  76. Force a redraw, clear prompt
  77. .It Ic q
  78. Quit the current context
  79. .It Ic ^G
  80. Quit and change directory
  81. .It Ic Q, ^Q
  82. Quit
  83. .It Ic \&?
  84. Help and configuration screen
  85. .El
  86. .Pp
  87. FILES
  88. .Pp
  89. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  90. .It Ic ^O
  91. Open with an application
  92. .It Ic n
  93. Create a new file or directory
  94. .It Ic D
  95. Show entry details
  96. .It Ic d
  97. Toggle detail view
  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 ^T
  109. Toggle path quote
  110. .It Ic P
  111. Copy files from selection
  112. .It Ic V
  113. Move files from selection
  114. .It Ic X
  115. Delete files from selection
  116. .It Ic ^X
  117. Delete entry
  118. .It Ic f
  119. Archive entry
  120. .It Ic F
  121. List files in archive
  122. .It Ic ^F
  123. Extract archive in current directory
  124. .It Ic m, M
  125. Show brief/full media info
  126. .It Ic e
  127. Open entry in EDITOR (fallback vi)
  128. .It Ic p
  129. Open entry in PAGER (fallback less)
  130. .El
  131. .Pp
  132. ORDER
  133. .Pp
  134. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  135. .It Ic ^J
  136. Toggle disk usage analyzer mode
  137. .It Ic S
  138. Toggle sort by apparent size
  139. .It Ic s
  140. Toggle sort by file size
  141. .It Ic t
  142. Toggle sort by time modified
  143. .El
  144. .Pp
  145. MISC
  146. .Pp
  147. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  148. .It Ic o
  149. Launch a GUI application
  150. .It Ic \&!, ^]
  151. Spawn SHELL in current directory (fallback sh)
  152. .It Ic R
  153. Run a custom script
  154. .It Ic L
  155. Lock terminal (Linux only)
  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 N"
  172. specify dir color (default blue), disables if N>7
  173. 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white
  174. .Pp
  175. .Fl e
  176. use exiftool instead of mediainfo
  177. .Pp
  178. .Fl i
  179. start in navigate-as-you-type mode
  180. .Pp
  181. .Fl l
  182. start in light mode (fewer details)
  183. .Pp
  184. .Fl "p file"
  185. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  186. .Pp
  187. .Fl S
  188. start in disk usage analyzer mode
  189. .Pp
  190. .Fl v
  191. show version and exit
  192. .Pp
  193. .Fl h
  194. show program help and exit
  195. .Sh CONFIGURATION
  196. .Nm
  197. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on OS X) as the desktop opener.
  198. .Pp
  199. There is no configuration file. Settings work on environment variables. Please
  200. refer to the ENVIRONMENT section below.
  201. .Pp
  202. Configuring
  203. .Nm
  204. to change to the last visited directory on quit requires shell integration in a
  205. few easy steps. Please visit the project page (linked below) for the
  206. instructions.
  207. .Sh CONTEXTS
  208. Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
  209. are available. The status of the contexts are shown in the top left corner:
  210. .Pp
  211. - the current context is in reverse
  212. .br
  213. - other used contexts are underlined
  214. .br
  215. - rest are unused
  216. .Pp
  217. To switch to a context press the Leader key followed by the context number (1-4).
  218. .Pp
  219. 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.
  220. .Pp
  221. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  222. .Sh FILTERS
  223. Filters support regexes to instantly (search-as-you-type) list the matching
  224. entries in the current directory.
  225. .Pp
  226. Ways to exit filter prompt:
  227. .Pp
  228. (1) press \fI^L\fR to clear filter followed by \fIBksp\fR (to clear the filter symbol, like vi)
  229. .br
  230. - at other prompts \fI^L\fR followed by \fIEnter\fR discards all changes and exits prompt
  231. .br
  232. (2) run a search with no matches and press \fIEnter\fR
  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. If
  244. .Nm
  245. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  246. .Pp
  247. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  248. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  249. .br
  250. In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  251. .Sh SELECTION MODE
  252. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  253. NNN_COPIER is set (see ENVIRONMENT section below).
  254. .Pp
  255. To copy multiple file paths the selection mode should be enabled using \fI^Y\fR.
  256. In this mode it's possible to
  257. .Pp
  258. (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry; or,
  259. .br
  260. (2) navigate to another file in the same directory to select a range of files.
  261. .Pp
  262. Pressing \fI^Y\fR again copies the paths and exits the selection mode. The files in the list can now
  263. be copied, moved or removed using respective keyboard shortcuts.
  264. .Pp
  265. To list the file paths copied to memory press \fIy\fR.
  266. .Sh ENVIRONMENT
  267. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  268. when dealing with the !, e and p commands respectively.
  269. .Pp
  270. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
  271. \fI;\fR:
  272. .Bd -literal
  273. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  274. NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.
  275. .Ed
  276. .Pp
  277. \fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
  278. files.
  279. .Bd -literal
  280. export NNN_USE_EDITOR=1
  281. .Ed
  282. .Pp
  283. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker.
  284. .Pp
  285. \fBNNN_COPIER:\fR set to a clipboard copier script. For example, on Linux:
  286. .Bd -literal
  287. -------------------------------------
  288. #!/bin/sh
  289. # comment the next line to convert newlines to spaces
  290. IFS=
  291. echo -n $1 | xsel --clipboard --input
  292. -------------------------------------
  293. 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.
  294. .Ed
  295. .Pp
  296. \fBNNN_QUOTE_ON:\fR wrap copied paths within single quotes. Useful for pasting
  297. names in the shell. Note that the filename is not escaped. So copying may still fail
  298. for filenames having quote(s) in them.
  299. .Pp
  300. \fBNNN_SCRIPT:\fR path to a custom script to invoke with currently selected file name as argument 1.
  301. .Bd -literal
  302. export NNN_SCRIPT=/usr/local/bin/nscript
  303. .Ed
  304. .Pp
  305. \fBNNN_MULTISCRIPT:\fR run multiple custom scripts.
  306. .Bd -literal
  307. export NNN_MULTISCRIPT=1
  308. .Ed
  309. .Pp
  310. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  311. .Bd -literal
  312. export NNN_SHOW_HIDDEN=1
  313. .Ed
  314. .Pp
  315. \fBNNN_NO_AUTOSELECT:\fR Disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  316. .Bd -literal
  317. export NNN_NO_AUTOSELECT=1
  318. .Ed
  319. .Pp
  320. \fBDISABLE_FILE_OPEN_ON_NAV:\fR Disable file open on \fBRight\fR or \fBl\fR keys. To open
  321. files, press \fBEnter\fR.
  322. .Bd -literal
  323. export DISABLE_FILE_OPEN_ON_NAV=1
  324. .Ed
  325. .Sh KNOWN ISSUES
  326. If you are using urxvt you might have to set backspace key to DEC.
  327. .Sh AUTHORS
  328. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  329. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  330. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  331. .Sh HOME
  332. .Em https://github.com/jarun/nnn