My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 年之前
10 年之前
7 年之前
7 年之前
10 年之前
10 年之前
5 年之前
10 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
10 年之前
5 年之前
10 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
5 年之前
10 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. .Dd Mar 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 -d
  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 -w
  20. .Op Ar -h
  21. .Op Ar PATH
  22. .Sh DESCRIPTION
  23. .Nm
  24. (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.
  25. .Pp
  26. .Nm
  27. opens the current working directory by default if
  28. .Ar PATH
  29. is not specified.
  30. .Sh KEYBINDS
  31. .Pp
  32. Press \fB?\fR in
  33. .Nm
  34. to see the list of keybinds.
  35. .Sh OPTIONS
  36. .Pp
  37. .Nm
  38. supports the following options:
  39. .Pp
  40. .Fl "b key"
  41. specify bookmark key to open
  42. .Pp
  43. .Fl d
  44. show hidden files
  45. .Pp
  46. .Fl e
  47. use exiftool instead of mediainfo
  48. .Pp
  49. .Fl i
  50. start in navigate-as-you-type mode
  51. .Pp
  52. .Fl l
  53. start in light mode (fewer details)
  54. .Pp
  55. .Fl n
  56. use version compare to sort files
  57. .Pp
  58. .Fl "p file"
  59. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  60. .Pp
  61. .Fl s
  62. use substring match for filters instead of regex
  63. .Pp
  64. .Fl S
  65. start in disk usage analyzer mode
  66. .Pp
  67. .Fl v
  68. show version and exit
  69. .Pp
  70. .Fl w
  71. wild load - entries unsorted on directory load
  72. .Pp
  73. .Fl h
  74. show program help and exit
  75. .Sh CONFIGURATION
  76. .Nm
  77. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on macOS) as the desktop opener.
  78. .Pp
  79. There is no configuration file. Settings work on environment variables. See ENVIRONMENT section below.
  80. .Pp
  81. Configuring
  82. .Nm
  83. to change to the last visited directory on quit requires shell integration in a
  84. few easy steps. Look up NNN_TMPFILE in the ENVIRONMENT section below.
  85. .Sh CONTEXTS
  86. Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
  87. are available. The status of the contexts are shown in the top left corner:
  88. .Pp
  89. - the current context is in reverse
  90. .br
  91. - other active contexts are underlined
  92. .br
  93. - rest are inactive
  94. .Pp
  95. To switch to a context press the Leader key followed by the context number (1-4).
  96. .Pp
  97. The first time a context is entered, it copies the state of the last visited context. Each context remembers its last visited directory.
  98. .Pp
  99. When a context is quit, the next active context is selected. If the last active context is quit, the program quits.
  100. .Pp
  101. Each context can have its own directory color specified. See ENVIRONMENT section below.
  102. .Sh FILTERS
  103. Filters support regexes (default) to instantly (search-as-you-type) list the matching
  104. entries in the current directory.
  105. .Pp
  106. Common use cases:
  107. .Pp
  108. (1) To list all matches starting with the filter expression, start the expression
  109. with a '^' (caret) symbol.
  110. .br
  111. (2) Type '\\.mkv' to list all MKV files.
  112. .br
  113. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  114. .Pp
  115. There is a program option to filter entries by substring match instead of regex.
  116. .Pp
  117. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  118. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  119. .br
  120. When there's a unique match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
  121. .br
  122. The \fIwild load\fR option can be extremely handy for users who use the \fInavigate-as-you-type\fR mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode.
  123. .Sh SELECTION MODE
  124. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  125. NNN_COPIER is set (see ENVIRONMENT section below).
  126. .Pp
  127. To select multiple files the selection mode should be enabled using \fI^Y\fR.
  128. In this mode it's possible to
  129. .Pp
  130. (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
  131. .br
  132. (2) navigate to another file in the same directory to select a range of files.
  133. .Pp
  134. Press \fI^Y\fR again to save the selection and exit selection mode.
  135. .Pp
  136. Selected files are visually indicated by a \fB+\fR.
  137. .br
  138. The files in the list can now be listed, copied, moved, removed, archived or linked.
  139. .Sh ENVIRONMENT
  140. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  141. when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
  142. .Pp
  143. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
  144. \fI;\fR:
  145. .Bd -literal
  146. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  147. NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.
  148. .Ed
  149. .Pp
  150. \fBNNN_OPENER:\fR specify a custom file opener.
  151. .Bd -literal
  152. export NNN_OPENER=mimeopen
  153. .Ed
  154. .Pp
  155. \fBNNN_OPENER_DETACH:\fR do not block when invoking file opener.
  156. .Bd -literal
  157. export NNN_OPENER_DETACH=1
  158. .Ed
  159. .Pp
  160. \fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
  161. .Bd -literal
  162. export NNN_CONTEXT_COLORS='1234'
  163. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  164. .Ed
  165. .Pp
  166. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
  167. .Pp
  168. \fBNNN_COPIER:\fR system clipboard copier script.
  169. .Bd -literal
  170. NOTE: File paths are copied to the tmp file \fBDIR/.nnncp\fR, where 'DIR' (by priority) is:
  171. \fI$HOME\fR or, \fI$TMPDIR\fR or, \fI/tmp\fR.
  172. The path is shown in the help and configuration screen.
  173. .Ed
  174. .Pp
  175. \fBNNN_SCRIPT_DIR:\fR \fIabsolute\fR path to script directory. Selected script is invoked with currently selected file name as argument 1.
  176. .Bd -literal
  177. export NNN_SCRIPT_DIR=/absolute/path/to/scripts_dir
  178. .Ed
  179. .Pp
  180. \fBNNN_NOTE:\fR \fIabsolute\fR path to a note file.
  181. .Bd -literal
  182. export NNN_NOTE='/home/user/.mynotes'
  183. .Ed
  184. .Pp
  185. \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.
  186. .Bd -literal
  187. export NNN_TMPFILE=/tmp/nnn
  188. .Ed
  189. .Pp
  190. \fBNNN_USE_EDITOR:\fR use EDITOR (VISUAL takes preference, preferably CLI, fallback vi) to handle text
  191. files.
  192. .Bd -literal
  193. export NNN_USE_EDITOR=1
  194. .Ed
  195. .Pp
  196. \fBNNN_NO_AUTOSELECT:\fR disable directory auto-selection in \fInavigate-as-you-type\fR mode.
  197. .Bd -literal
  198. export NNN_NO_AUTOSELECT=1
  199. .Ed
  200. .Pp
  201. \fBNNN_RESTRICT_NAV_OPEN:\fR disable file open on \fBRight\fR or \fBl\fR keys (\fBEnter\fR opens files).
  202. .Bd -literal
  203. export NNN_RESTRICT_NAV_OPEN=1
  204. .Ed
  205. .Pp
  206. \fBNNN_RESTRICT_0B:\fR restrict opening 0-byte files due to unexpected behaviour; use \fIedit\fR or \fIopen with\fR to open the file.
  207. .Bd -literal
  208. export NNN_RESTRICT_0B=1
  209. .Ed
  210. .Pp
  211. \fBNNN_TRASH:\fR trash (instead of \fIdelete\fR) files to desktop Trash.
  212. .Bd -literal
  213. export NNN_TRASH=1
  214. .Ed
  215. .Pp
  216. \fBNNN_OPS_PROG:\fR show progress of copy, move operations (Linux-only, needs advcpmv).
  217. .Bd -literal
  218. export NNN_OPS_PROG=1
  219. .Ed
  220. .Sh KNOWN ISSUES
  221. If you are using urxvt you might have to set backspace key to DEC.
  222. .Sh AUTHORS
  223. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  224. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  225. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  226. .Sh HOME
  227. .Em https://github.com/jarun/nnn