My build of nnn with minor changes
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

295 satır
8.2 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 multiple file path copy mode
  107. .It Ic y
  108. Show copy buffer
  109. .It Ic ^T
  110. Toggle path quote
  111. .It Ic ^L
  112. Force a redraw, clear prompt
  113. .It Ic Esc
  114. Exit prompt
  115. .It Ic L
  116. Lock terminal (Linux only)
  117. .It Ic o
  118. Launch a GUI application
  119. .It Ic \&?
  120. Toggle help and settings screen
  121. .It Ic q
  122. Quit the current context
  123. .It Ic ^G
  124. Quit and change directory
  125. .It Ic Q, ^X
  126. Quit
  127. .El
  128. .Pp
  129. Backing up one directory level will set the cursor position at the
  130. directory you came out of.
  131. .Pp
  132. Help & settings, file details, media info and archive listing are shown in the
  133. PAGER. Please use the PAGER-specific keys in these screens.
  134. .Pp
  135. .Nm
  136. supports the following options:
  137. .Pp
  138. .Fl "b key"
  139. specify bookmark key to open
  140. .Pp
  141. .Fl "c N"
  142. specify dir color (default blue), disables if N>7
  143. 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white
  144. .Pp
  145. .Fl e
  146. use exiftool instead of mediainfo
  147. .Pp
  148. .Fl i
  149. start in navigate-as-you-type mode
  150. .Pp
  151. .Fl l
  152. start in light mode (fewer details)
  153. .Pp
  154. .Fl S
  155. start in disk usage analyzer mode
  156. .Pp
  157. .Fl v
  158. show version and exit
  159. .Pp
  160. .Fl h
  161. show program help and exit
  162. .Sh CONFIGURATION
  163. .Nm
  164. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on OS X) as the desktop opener.
  165. .Pp
  166. There is no configuration file. Settings work on environment variables. Please
  167. refer to the ENVIRONMENT section below.
  168. .Pp
  169. Configuring
  170. .Nm
  171. to change to the last visited directory on quit requires shell integration in a
  172. few easy steps. Please visit the project page (linked below) for the
  173. instructions.
  174. .Sh CONTEXTS
  175. Contexts (aka \fItabs\fR aka \fIworkspaces\fR) serve the purpose of exploring multiple directories
  176. simultaneously. 4 contexts are available. The status of the contexts are shown in the top left corner:
  177. .Pp
  178. - the current context is in reverse
  179. .br
  180. - other used contexts are underlined
  181. .br
  182. - rest are unused
  183. .Pp
  184. The key prompt understands contexts. To switch contexts press \fI^B\fR and enter the context number (1-4).
  185. .Pp
  186. 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.
  187. .Pp
  188. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  189. .Sh FILTERS
  190. Filters support regexes to instantly (search-as-you-type) list the matching
  191. entries in the current directory.
  192. .Pp
  193. Ways to exit filter prompt:
  194. .Pp
  195. (1) press \fI^L\fR to clear filter followed by \fIBksp\fR (to clear the filter symbol, like vi)
  196. .br
  197. - at other prompts \fI^L\fR followed by \fIEnter\fR discards all changes and exits prompt
  198. .br
  199. (2) run a search with no matches and press \fIEnter\fR
  200. .Pp
  201. Common use cases:
  202. .Pp
  203. (1) To list all matches starting with the filter expression, start the expression
  204. with a '^' (caret) symbol.
  205. .br
  206. (2) Type '\\.mkv' to list all MKV files.
  207. .br
  208. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  209. .Pp
  210. If
  211. .Nm
  212. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  213. .Pp
  214. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  215. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  216. .br
  217. In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  218. .Sh MULTI-COPY MODE
  219. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  220. NNN_COPIER is set (see ENVIRONMENT section below).
  221. .Pp
  222. To copy multiple file paths the multi-copy mode should be enabled using \fI^Y\fR.
  223. In this mode it's possible to
  224. .Pp
  225. (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry; or,
  226. .br
  227. (2) navigate to another file in the same directory to select a range of files.
  228. .Pp
  229. Pressing \fI^Y\fR again copies the paths to clipboard and exits the multi-copy mode.
  230. .Pp
  231. To list the file paths copied to memory press \fIy\fR.
  232. .Sh ENVIRONMENT
  233. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  234. when dealing with the !, e and p commands respectively.
  235. .Pp
  236. \fBNNN_BMS:\fR bookmark string as \fIkey:location\fR pairs (max 10) separated by
  237. \fI;\fR:
  238. .Bd -literal
  239. export NNN_BMS='doc:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  240. .Ed
  241. .Pp
  242. \fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
  243. files.
  244. .Bd -literal
  245. export NNN_USE_EDITOR=1
  246. .Ed
  247. .Pp
  248. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal
  249. screensaver.
  250. .Pp
  251. \fBNNN_COPIER:\fR set to a clipboard copier script. For example, on Linux:
  252. .Bd -literal
  253. -------------------------------------
  254. #!/bin/sh
  255. # comment the next line to convert newlines to spaces
  256. IFS=
  257. echo -n $1 | xsel --clipboard --input
  258. -------------------------------------
  259. .Ed
  260. .br
  261. 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.
  262. .Pp
  263. \fBNNN_QUOTE_ON:\fR wrap copied paths within single quotes. Useful for pasting
  264. names in the shell. Note that the filename is not escaped. So copying may still fail
  265. for filenames having quote(s) in them.
  266. .Pp
  267. \fBNNN_SCRIPT:\fR path to a custom script to invoke with currently selected file name as argument 1.
  268. .Bd -literal
  269. export NNN_SCRIPT=/usr/local/bin/nscript
  270. .Ed
  271. .Pp
  272. \fBNNN_MULTISCRIPT:\fR run multiple custom scripts.
  273. .Bd -literal
  274. export NNN_MULTISCRIPT=1
  275. .Ed
  276. .Pp
  277. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  278. .Bd -literal
  279. export NNN_SHOW_HIDDEN=1
  280. .Ed
  281. .Pp
  282. \fBNNN_NO_AUTOSELECT:\fR Disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  283. .Bd -literal
  284. export export NNN_NO_AUTOSELECT=1
  285. .Ed
  286. .Sh KNOWN ISSUES
  287. If you are using urxvt you might have to set backspace key to DEC.
  288. .Sh AUTHORS
  289. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  290. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  291. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  292. .Sh HOME
  293. .Em https://github.com/jarun/nnn