My build of nnn with minor changes
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

254 linhas
8.1 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
  14. .Op Ar -g
  15. .Op Ar -H
  16. .Op Ar -K
  17. .Op Ar -n
  18. .Op Ar -p file
  19. .Op Ar -Q
  20. .Op Ar -r
  21. .Op Ar -R
  22. .Op Ar -s name
  23. .Op Ar -S
  24. .Op Ar -v
  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
  60. use $EDITOR for internal undetached edits
  61. .Pp
  62. .Fl g
  63. use regex filters instead of substring match
  64. .Pp
  65. .Fl H
  66. show hidden files
  67. .Pp
  68. .Fl K
  69. test for keybind collision
  70. .Pp
  71. .Fl n
  72. start in navigate-as-you-type mode
  73. .Pp
  74. .Fl o
  75. open files only on Enter key
  76. .Pp
  77. .Fl "p file"
  78. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  79. .Pp
  80. .Fl Q
  81. disable confirmation when quitting program with multiple active contexts
  82. .Pp
  83. .Fl r
  84. show cp, mv progress (Linux-only, needs advcpmv; '^T' shows the progress on BSD/macOS)
  85. .Pp
  86. .Fl R
  87. disable rollover at edges
  88. .Pp
  89. .Fl "s name"
  90. load a session by name
  91. .Pp
  92. .Fl S
  93. start in disk usage analyzer mode
  94. .Pp
  95. .Fl t
  96. disable directory auto-select in navigate-as-you-type mode
  97. .Pp
  98. .Fl v
  99. show version and exit
  100. .Pp
  101. .Fl V
  102. use case-insensitive version compare to sort files
  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 are substrings to find matching entries in the current directory instantly (search-as-you-type). There is a program option to use regex filters.
  141. .Pp
  142. Common regex use cases:
  143. .Pp
  144. (1) To list all matches starting with the filter expression, start the expression
  145. with a '^' (caret) symbol.
  146. .br
  147. (2) Type '\\.mkv' to list all MKV files.
  148. .br
  149. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  150. .Pp
  151. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  152. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  153. .br
  154. When there's a unique match and it's a directory,
  155. .Nm
  156. auto selects the directory and enters it in this mode. Use the relevant program option to disable this behaviour.
  157. .Sh SELECTION
  158. There are 3 groups of keybinds to add files to selection:
  159. .Pp
  160. (1) hovered file selection toggle (deselects if '+' is visible before the entry, else adds to selection)
  161. .br
  162. (2) add a range of files to selection (repeat the range key on the same entry twice to clear selection completely)
  163. .br
  164. (3) add all files in the current directory to selection
  165. .Pp
  166. A selection can be listed, edited, copied, moved, removed, archived or linked.
  167. .Pp
  168. Absolute paths of the selected files are copied to \fB.selection\fR file in the config directory.
  169. .Pp
  170. To edit the selection use the _edit selection_ key. Use this key to remove a file from selection after you navigate away from its directory. Editing doesn't end the selection mode. You can add more files to the selection and edit the list again.
  171. .Sh FILE SIZE
  172. 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.
  173. .Sh ENVIRONMENT
  174. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  175. when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.
  176. .Pp
  177. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs (max 10) separated by
  178. \fI;\fR:
  179. .Bd -literal
  180. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  181. NOTE: To go to a bookmark, press the Go to bookmark shortcut followed by the key.
  182. .Ed
  183. .Pp
  184. \fBNNN_PLUG:\fR directly executable plugins as \fIkey_char:location\fR pairs (max 10) separated by
  185. \fI;\fR:
  186. .Bd -literal
  187. export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;t:imgthumb;i:mediainf'
  188. NOTE: To run a plugin directly, press \fI:\fR followed by the plugin key.
  189. .Ed
  190. .Pp
  191. To assign keys to arbitrary non-background non-shell-interpreted cli
  192. commands and invoke like plugins, add \fI_\fR (underscore) before the command.
  193. .Bd -literal
  194. export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn;o:fzopen;m:nmount'
  195. NOTES:
  196. 1. Use single quotes for $NNN_PLUG so $nnn is not interpreted
  197. 2. $nnn should be the last argument (IF you want to pass the hovered file name)
  198. 3. (Again) add \fI_\fR before the command
  199. .Ed
  200. .Pp
  201. \fBNNN_USE_EDITOR:\fR use VISUAL (else EDITOR, preferably CLI, fallback vi) to handle text files.
  202. .Bd -literal
  203. export NNN_USE_EDITOR=1
  204. .Ed
  205. .Pp
  206. \fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
  207. .Bd -literal
  208. export NNN_CONTEXT_COLORS='1234'
  209. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  210. .Ed
  211. .Pp
  212. \fBNNN_SSHFS_OPTS:\fR pass additional options to sshfs command:
  213. .Bd -literal
  214. export NNN_SSHFS_OPTS='sshfs -o reconnect,idmap=user,cache_timeout=3600'
  215. NOTE: The options must be preceded by `sshfs` and comma-separated without any space between them.
  216. .Ed
  217. .Pp
  218. \fBNNN_RCLONE_OPTS:\fR pass additional options to rclone command:
  219. .Bd -literal
  220. export NNN_RCLONE_OPTS='rclone mount --read-only --no-checksum'
  221. NOTE: The options must be preceded by `rclone` and max 5 flags are supported.
  222. .Ed
  223. .Pp
  224. \fBNNN_OPENER:\fR specify a custom file opener.
  225. .Bd -literal
  226. export NNN_OPENER=nuke
  227. NOTE: `nuke` is a file opener available in plugin repository
  228. .Ed
  229. .Pp
  230. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker (default: disabled).
  231. .Pp
  232. \fBNNN_TRASH:\fR trash (instead of \fIdelete\fR) files to desktop Trash.
  233. .Bd -literal
  234. export NNN_TRASH=1
  235. .Ed
  236. .Pp
  237. \fBNNN:\fR this is a special variable set to the current entry before executing a command from the command prompt or spawning a shell.
  238. .Sh KNOWN ISSUES
  239. .Nm
  240. may not handle keypresses correctly when used with tmux (see issue #104 for more details). Set \fBTERM=xterm-256color\fR to address it.
  241. .Sh AUTHORS
  242. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com ,
  243. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  244. .An Dimitris Papastamos Aq Mt sin@2f30.org .
  245. .Sh HOME
  246. .Em https://github.com/jarun/nnn