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.
 
 
 
 
 
 

261 satır
8.4 KiB

  1. .Dd Dec 05, 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 -a
  10. .Op Ar -b key
  11. .Op Ar -c
  12. .Op Ar -d
  13. .Op Ar -e name
  14. .Op Ar -E
  15. .Op Ar -f
  16. .Op Ar -H
  17. .Op Ar -i
  18. .Op Ar -K
  19. .Op Ar -n
  20. .Op Ar -p file
  21. .Op Ar -r
  22. .Op Ar -R
  23. .Op Ar -s
  24. .Op Ar -S
  25. .Op Ar -v
  26. .Op Ar -x
  27. .Op Ar -h
  28. .Op Ar PATH
  29. .Sh DESCRIPTION
  30. .Nm
  31. (Nnn's 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.
  32. .Pp
  33. .Nm
  34. opens the current working directory by default if
  35. .Ar PATH
  36. is not specified.
  37. .Sh KEYBINDS
  38. .Pp
  39. Press \fB?\fR in
  40. .Nm
  41. to see the list of keybinds.
  42. .Sh OPTIONS
  43. .Pp
  44. .Nm
  45. supports the following options:
  46. .Pp
  47. .Fl a
  48. use access time for all operations (default: modification time)
  49. .Pp
  50. .Fl "b key"
  51. specify bookmark key to open
  52. .Pp
  53. .Fl c
  54. opener opens files in cli utilities only
  55. .Pp
  56. .Fl d
  57. detail mode
  58. .Pp
  59. .Fl "e name"
  60. load a session by name
  61. .Pp
  62. .Fl E
  63. use $EDITOR for internal undetached edits
  64. .Pp
  65. .Fl f
  66. run filter as command when the prompt key is pressed
  67. .Pp
  68. .Fl H
  69. show hidden files
  70. .Pp
  71. .Fl i
  72. start in navigate-as-you-type mode
  73. .Pp
  74. .Fl K
  75. test for keybind collision
  76. .Pp
  77. .Fl n
  78. use case-insensitive version compare to sort files
  79. .Pp
  80. .Fl o
  81. open files only on Enter key
  82. .Pp
  83. .Fl "p file"
  84. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  85. .Pp
  86. .Fl r
  87. show cp, mv progress (Linux-only, needs advcpmv; '^T' shows the progress on BSD/macOS)
  88. .Pp
  89. .Fl R
  90. disable rollover at edges
  91. .Pp
  92. .Fl s
  93. use substring match for filters instead of regex
  94. .Pp
  95. .Fl S
  96. start in disk usage analyzer mode
  97. .Pp
  98. .Fl t
  99. disable directory auto-select in navigate-as-you-type mode
  100. .Pp
  101. .Fl v
  102. show version and exit
  103. .Pp
  104. .Fl x
  105. show notis on selection cp, mv, rm completion; copy path to system clipboard on select
  106. .Pp
  107. .Fl h
  108. show program help and exit
  109. .Sh CONFIGURATION
  110. .Nm
  111. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on macOS) as the desktop opener.
  112. .Pp
  113. There is no configuration file. Associated files are stored in \fB${XDG_CONFIG_HOME:-$HOME/.config}/nnn/\fR. Settings work on environment variables. See ENVIRONMENT section below.
  114. .Sh CONTEXTS
  115. Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts
  116. are available. The status of the contexts are shown in the top left corner:
  117. .Pp
  118. - the current context is in reverse video
  119. .br
  120. - other active contexts are underlined
  121. .br
  122. - rest are inactive
  123. .Pp
  124. On context creation, the state of the previous context is copied. Each context remembers its last visited directory.
  125. .Pp
  126. Each context can have its own directory color specified. See ENVIRONMENT section below.
  127. .Sh SESSIONS
  128. Sessions are a way to save and restore states of work. A session stores the settings and contexts.
  129. .Pp
  130. Sessions can be loaded dynamically from within a running
  131. .Nm
  132. instance, or with a program option.
  133. .Pp
  134. When a session is loaded dynamically, the last working session is saved automatically to a dedicated
  135. -- "last session" -- session file.
  136. .Pp
  137. All the session files are located in the \fB${XDG_CONFIG_HOME:-$HOME/.config}/nnn/sessions\fR directory by the session name.
  138. "@" is the "last session" file.
  139. .Sh FILTERS
  140. Filters support regexes (default) to instantly (search-as-you-type) list the matching
  141. entries in the current directory.
  142. .Pp
  143. Common use cases:
  144. .Pp
  145. (1) To list all matches starting with the filter expression, start the expression
  146. with a '^' (caret) symbol.
  147. .br
  148. (2) Type '\\.mkv' to list all MKV files.
  149. .br
  150. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  151. .Pp
  152. There is a program option to filter entries by substring match instead of regex.
  153. .Pp
  154. There is a program option to execute the current filter as a command when the prompt key is pressed.
  155. .Pp
  156. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  157. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  158. .br
  159. When there's a unique match and it's a directory,
  160. .Nm
  161. auto selects the directory and enters it in this mode.
  162. .Sh SELECTION
  163. There are 3 groups of shortcuts to add files to selection:
  164. .Pp
  165. (1) hovered file selection toggle (deselects if '+' is visible before the entry, else adds to selection)
  166. .br
  167. (2) add a range of files to selection
  168. .br
  169. (3) add all files in the current directory to selection
  170. .Pp
  171. The selection can now be listed, copied, moved, removed, archived or linked.
  172. .Pp
  173. Absolute paths of the selected files are copied to the temporary file \fB.selection\fR in the config directory. The path is shown in the help and configuration screen.
  174. .Pp
  175. To flush the selection without running any operation use the _edit, flush selection_ key. The list is flushed even if unchanged. Use this key to remove a file from selection after you navigate away from its directory. Flushing doesn't end the selection mode. You can add more files to the selection and edit/flush the list again. Flushing doesn't end the selection mode. You can add more files to the selection and edit/flush the list again.
  176. .Pp
  177. Repeat range selection on the same entry twice to clear selection completely.
  178. .Sh FILE SIZE
  179. The minimum file size unit is byte (B). The rest are K, M, G, T, P, E, Z, Y (powers of 1024), same as the default units in \fIls\fR.
  180. .Sh ENVIRONMENT
  181. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  182. when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
  183. .Pp
  184. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
  185. \fI;\fR:
  186. .Bd -literal
  187. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  188. NOTE: To go to a bookmark, press the Lead key followed by the bookmark key.
  189. .Ed
  190. .Pp
  191. \fBNNN_PLUG:\fR directly executable plugins as \fIkey_char:location\fR pairs (max 10) separated by
  192. \fI;\fR:
  193. .Bd -literal
  194. export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;t:imgthumb;i:mediainf'
  195. NOTE: To run a plugin directly, press \fI:\fR followed by the plugin key.
  196. .Ed
  197. .Pp
  198. To assign keys to arbitrary non-background non-shell-interpreted cli
  199. commands and invoke like plugins, add \fI_\fR (underscore) before the command.
  200. .Bd -literal
  201. export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn;o:fzopen;m:nmount'
  202. NOTES:
  203. 1. Use single quotes for $NNN_PLUG so $nnn is not interpreted
  204. 2. $nnn should be the last argument (IF you want to pass the hovered file name)
  205. 3. (Again) add \fI_\fR before the command
  206. .Ed
  207. .Pp
  208. \fBNNN_USE_EDITOR:\fR use VISUAL (else EDITOR, preferably CLI, fallback vi) to handle text files.
  209. .Bd -literal
  210. export NNN_USE_EDITOR=1
  211. .Ed
  212. .Pp
  213. \fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
  214. .Bd -literal
  215. export NNN_CONTEXT_COLORS='1234'
  216. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  217. .Ed
  218. .Pp
  219. \fBNNN_SSHFS_OPTS:\fR pass additional options to sshfs command:
  220. .Bd -literal
  221. export NNN_SSHFS_OPTS='sshfs -o reconnect,idmap=user,cache_timeout=3600'
  222. NOTE: The options must be preceded by `sshfs` and comma-separated without any space between them.
  223. .Ed
  224. .Pp
  225. \fBNNN_RCLONE_OPTS:\fR pass additional options to rclone command:
  226. .Bd -literal
  227. export NNN_RCLONE_OPTS='rclone mount --read-only --no-checksum'
  228. NOTE: The options must be preceded by `rclone` and max 5 flags are supported.
  229. .Ed
  230. .Pp
  231. \fBNNN_OPENER:\fR specify a custom file opener.
  232. .Bd -literal
  233. export NNN_OPENER=nuke
  234. NOTE: `nuke` is a file opener available in plugin repository
  235. .Ed
  236. .Pp
  237. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
  238. .Pp
  239. \fBNNN_TRASH:\fR trash (instead of \fIdelete\fR) files to desktop Trash.
  240. .Bd -literal
  241. export NNN_TRASH=1
  242. .Ed
  243. .Pp
  244. \fBNNN:\fR this is a special variable set to the current entry before executing a command from the command prompt or spawning a shell.
  245. .Sh KNOWN ISSUES
  246. .Nm
  247. may not handle keypresses correctly when used with tmux (see issue #104 for more details). Set \fBTERM=xterm-256color\fR to address it.
  248. .Sh AUTHORS
  249. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com ,
  250. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  251. .An Dimitris Papastamos Aq Mt sin@2f30.org .
  252. .Sh HOME
  253. .Em https://github.com/jarun/nnn