My build of nnn with minor changes
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

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