My build of nnn with minor changes
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 
 
 

304 wiersze
8.3 KiB

  1. .Dd Oct 19, 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 nlay
  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. .Pp
  28. .Nm
  29. supports both vi-like and emacs-like key bindings as listed below.
  30. .Pp
  31. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  32. .It Ic [Up], k, ^P
  33. Move to previous entry
  34. .It Ic [Down], j, ^N
  35. Move to next entry
  36. .It Ic [PgUp], ^U
  37. Scroll up half a page
  38. .It Ic [PgDn], ^D
  39. Scroll down half a page
  40. .It Ic [Home], g, ^, ^A
  41. Move to the first entry
  42. .It Ic [End], G, $, ^E
  43. Move to the last entry
  44. .It Ic [Right], [Enter], l, ^M
  45. Open file or enter directory
  46. .It Ic [Left], [Backspace], h, ^H
  47. Back up one directory level
  48. .It Ic ^O
  49. Open with a custom application
  50. .It Ic [Insert], ^I
  51. Toggle navigate-as-you-type mode
  52. .It Ic ~
  53. Change to the HOME directory
  54. .It Ic &
  55. Change to initial directory
  56. .It Ic \-
  57. Change to the last visited directory
  58. .It Ic /
  59. Change filter (more information below)
  60. .It Ic \&.
  61. Toggle show hidden . (dot) files
  62. .It Ic ^B
  63. Show key prompt (recognizes bookmark keys, ~, -, & and context IDs)
  64. .It Ic b
  65. Pin current directory
  66. .It Ic ^V
  67. Visit pinned directory
  68. .It Ic d
  69. Toggle detail view
  70. .It Ic D
  71. Show current file details screen
  72. .It Ic m
  73. Show brief media info
  74. .It Ic M
  75. Show full media info
  76. .It Ic n
  77. Create a new file or directory
  78. .It Ic ^R
  79. Rename selected entry
  80. .It Ic r
  81. Open directory in vidir
  82. .It Ic s
  83. Toggle sort by file size
  84. .It Ic S
  85. Toggle sort by apparent size
  86. .It Ic ^J
  87. Toggle disk usage analyzer mode
  88. .It Ic t
  89. Toggle sort by time modified
  90. .It Ic \&!, ^]
  91. Spawn SHELL in PWD (fallback sh)
  92. .It Ic R
  93. Run a custom script
  94. .It Ic e
  95. Open current entry in EDITOR (fallback vi)
  96. .It Ic p
  97. Open current entry in PAGER (fallback less)
  98. .It Ic f
  99. Archive current entry
  100. .It Ic F
  101. List files in archive
  102. .It Ic ^F
  103. Extract archive in current directory
  104. .It Ic Space, ^K
  105. Invoke file path copier
  106. .It Ic ^Y
  107. Toggle multiple file path copy mode
  108. .It Ic y
  109. Show copy buffer
  110. .It Ic ^T
  111. Toggle path quote
  112. .It Ic ^L
  113. Force a redraw, clear prompt
  114. .It Ic Esc
  115. Exit prompt
  116. .It Ic L
  117. Lock terminal (Linux only)
  118. .It Ic o
  119. Launch a GUI application
  120. .It Ic \&?
  121. Toggle help and settings screen
  122. .It Ic q
  123. Quit the current context
  124. .It Ic ^G
  125. Quit and change directory
  126. .It Ic Q, ^X
  127. Quit
  128. .El
  129. .Pp
  130. Backing up one directory level will set the cursor position at the
  131. directory you came out of.
  132. .Pp
  133. Help & settings, file details, media info and archive listing are shown in the
  134. PAGER. Please use the PAGER-specific keys in these screens.
  135. .Pp
  136. .Nm
  137. supports the following options:
  138. .Pp
  139. .Fl "b key"
  140. specify bookmark key to open
  141. .Pp
  142. .Fl "c N"
  143. specify dir color (default blue), disables if N>7
  144. 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white
  145. .Pp
  146. .Fl e
  147. use exiftool instead of mediainfo
  148. .Pp
  149. .Fl i
  150. start in navigate-as-you-type mode
  151. .Pp
  152. .Fl l
  153. start in light mode (fewer details)
  154. .Pp
  155. .Fl "p nlay"
  156. path to custom nlay
  157. .Pp
  158. .Fl S
  159. start in disk usage analyzer mode
  160. .Pp
  161. .Fl v
  162. show version and exit
  163. .Pp
  164. .Fl h
  165. show program help and exit
  166. .Sh CONFIGURATION
  167. .Nm
  168. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on OS X) as the desktop
  169. opener. It invokes
  170. .Pa nlay
  171. to run the terminal locker. Read more on
  172. .Pa nlay
  173. at:
  174. .br
  175. .Em https://github.com/jarun/nnn/wiki/all-about-nlay
  176. .Pp
  177. There is no configuration file. Settings work on environment variables. Please
  178. refer to the ENVIRONMENT section below.
  179. .Pp
  180. Configuring
  181. .Nm
  182. to change to the last visited directory on quit requires shell integration in a
  183. few easy steps. Please visit the project page (linked below) for the
  184. instructions.
  185. .Sh CONTEXTS
  186. Contexts (aka \fItabs\fR aka \fIworkspaces\fR) serve the purpose of exploring multiple directories
  187. simultaneously. 4 contexts are available. The status of the contexts are shown in the top left corner:
  188. .Pp
  189. - the current context is in reverse
  190. .br
  191. - other used contexts are underlined
  192. .br
  193. - rest are unused
  194. .Pp
  195. The key prompt understands contexts. To switch contexts press \fI^B\fR and enter the context number (1-4).
  196. .Pp
  197. 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.
  198. .Pp
  199. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  200. .Sh FILTERS
  201. Filters support regexes to instantly (search-as-you-type) list the matching
  202. entries in the current directory.
  203. .Pp
  204. Ways to exit filter prompt:
  205. .Pp
  206. (1) press \fI^L\fR to clear filter followed by \fIBksp\fR (to clear the filter symbol, like vi)
  207. .br
  208. - at other prompts \fI^L\fR followed by \fIEnter\fR discards all changes and exits prompt
  209. .br
  210. (2) run a search with no matches and press \fIEnter\fR
  211. .Pp
  212. Common use cases:
  213. .Pp
  214. (1) To list all matches starting with the filter expression, start the expression
  215. with a '^' (caret) symbol.
  216. .br
  217. (2) Type '\\.mkv' to list all MKV files.
  218. .br
  219. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  220. .Pp
  221. If
  222. .Nm
  223. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  224. .Pp
  225. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  226. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  227. .br
  228. In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  229. .Sh MULTI-COPY MODE
  230. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  231. NNN_COPIER is set (see ENVIRONMENT section below).
  232. .Pp
  233. To copy multiple file paths the multi-copy mode should be enabled using \fI^Y\fR.
  234. In this mode it's possible to
  235. .Pp
  236. (1) select multiple files one by one by pressing \fI^K\fR on each entry; or,
  237. .br
  238. (2) navigate to another file in the same directory to select a range of files.
  239. .Pp
  240. Pressing \fI^Y\fR again copies the paths to clipboard and exits the multi-copy mode.
  241. .Sh ENVIRONMENT
  242. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  243. when dealing with the !, e and p commands respectively.
  244. .Pp
  245. \fBNNN_BMS:\fR bookmark string as \fIkey:location\fR pairs (max 10) separated by
  246. \fI;\fR:
  247. .Bd -literal
  248. export NNN_BMS='doc:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  249. .Ed
  250. .Pp
  251. \fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
  252. files.
  253. .Bd -literal
  254. export NNN_USE_EDITOR=1
  255. .Ed
  256. .Pp
  257. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal
  258. screensaver.
  259. .Pp
  260. \fBNNN_COPIER:\fR set to a clipboard copier script. For example, on Linux:
  261. .Bd -literal
  262. -------------------------------------
  263. #!/bin/sh
  264. # comment the next line to convert newlines to spaces
  265. IFS=
  266. echo -n $1 | xsel --clipboard --input
  267. -------------------------------------
  268. .Ed
  269. .br
  270. 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.
  271. .Pp
  272. \fBNNN_QUOTE_ON:\fR wrap copied paths within single quotes. Useful for pasting
  273. names in the shell. Note that the filename is not escaped. So copying may still fail
  274. for filenames having quote(s) in them.
  275. .Pp
  276. \fBNNN_SCRIPT:\fR path to a custom script to invoke with currently selected file name as argument 1.
  277. .Bd -literal
  278. export NNN_SCRIPT=/usr/local/bin/nscript
  279. .Ed
  280. .Pp
  281. \fBNNN_MULTISCRIPT:\fR run multiple custom scripts.
  282. .Bd -literal
  283. export NNN_MULTISCRIPT=1
  284. .Ed
  285. .Pp
  286. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  287. .Bd -literal
  288. export NNN_SHOW_HIDDEN=1
  289. .Ed
  290. .Pp
  291. \fBNNN_NO_AUTOSELECT:\fR Disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  292. .Bd -literal
  293. export export NNN_NO_AUTOSELECT=1
  294. .Ed
  295. .Sh KNOWN ISSUES
  296. If you are using urxvt you might have to set backspace key to DEC.
  297. .Sh AUTHORS
  298. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  299. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  300. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  301. .Sh HOME
  302. .Em https://github.com/jarun/nnn