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.
 
 
 
 
 
 

341 linhas
10 KiB

  1. .Dd Jan 15, 2020
  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 -A
  11. .Op Ar -b key
  12. .Op Ar -c
  13. .Op Ar -d
  14. .Op Ar -E
  15. .Op Ar -g
  16. .Op Ar -H
  17. .Op Ar -K
  18. .Op Ar -n
  19. .Op Ar -p file
  20. .Op Ar -Q
  21. .Op Ar -r
  22. .Op Ar -R
  23. .Op Ar -s name
  24. .Op Ar -S
  25. .Op Ar -v
  26. .Op Ar -V
  27. .Op Ar -x
  28. .Op Ar -h
  29. .Op Ar PATH
  30. .Sh DESCRIPTION
  31. .Nm
  32. (Nnn's Not Noice) is a performance-optimized, feature-packed fork of
  33. noice (http://git.2f30.org/noice/) with seamless desktop integration,
  34. simplified navigation, \fInavigate-as-you-type\fR mode with auto select,
  35. disk usage analyzer mode, bookmarks, contexts, application launcher,
  36. familiar navigation shortcuts, subshell spawning and much more.It
  37. remains a simple and efficient file manager that stays out of your way.
  38. .Pp
  39. .Nm
  40. opens the current working directory by default if
  41. .Ar PATH
  42. is not specified.
  43. .Sh KEYBINDS
  44. .Pp
  45. Press \fB?\fR in
  46. .Nm
  47. to see the list of keybinds.
  48. .Sh OPTIONS
  49. .Pp
  50. .Nm
  51. supports the following options:
  52. .Pp
  53. .Fl a
  54. use access time for all operations (default: modification time)
  55. .Pp
  56. .Fl A
  57. disable directory auto-select in navigate-as-you-type mode
  58. .Pp
  59. .Fl "b key"
  60. specify bookmark key to open
  61. .Pp
  62. .Fl c
  63. opener opens files in cli utilities only
  64. .Pp
  65. .Fl d
  66. detail mode
  67. .Pp
  68. .Fl E
  69. use $EDITOR for internal undetached edits
  70. .Pp
  71. .Fl g
  72. use regex filters instead of substring match
  73. .Pp
  74. .Fl H
  75. show hidden files
  76. .Pp
  77. .Fl K
  78. test for keybind collision
  79. .Pp
  80. .Fl n
  81. start in navigate-as-you-type mode
  82. .Pp
  83. .Fl o
  84. open files only on Enter key
  85. .Pp
  86. .Fl "p file"
  87. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  88. .Pp
  89. .Fl Q
  90. disable confirmation on quit with multiple contexts active
  91. .Pp
  92. .Fl r
  93. show cp, mv progress
  94. (Linux-only, needs advcpmv; '^T' shows the progress on BSD/macOS)
  95. .Pp
  96. .Fl R
  97. disable rollover at edges
  98. .Pp
  99. .Fl "s name"
  100. load a session by name
  101. .Pp
  102. .Fl S
  103. start in disk usage analyzer mode
  104. .Pp
  105. .Fl v
  106. use case-insensitive version compare to sort files
  107. .Pp
  108. .Fl V
  109. show version and exit
  110. .Pp
  111. .Fl x
  112. show notis on selection cp, mv, rm completion
  113. copy path to system clipboard on select
  114. .Pp
  115. .Fl h
  116. show program help and exit
  117. .Sh CONFIGURATION
  118. There is no configuration file. Associated files are at
  119. .Pp
  120. \fB${XDG_CONFIG_HOME:-$HOME/.config}/nnn/\fR
  121. .Pp
  122. Configuration is done using a few optional (set if you need) environment
  123. variables. See ENVIRONMENT section.
  124. .Pp
  125. .Nm
  126. uses \fIxdg-open\fR (on Linux), \fIopen(1)\fR (on macOS), \fIcygstart\fR on
  127. (Cygwin) and \fIopen\fR on (Haiku) as the desktop opener. It's also possible
  128. to specify a custom opener. See ENVIRONMENT section.
  129. .Sh CONTEXTS
  130. Contexts serve the purpose of exploring multiple directories simultaneously. 4
  131. contexts are available. The status of the contexts are shown in the top left
  132. corner:
  133. .Pp
  134. - the current context is in reverse video
  135. .br
  136. - other active contexts are underlined
  137. .br
  138. - rest are inactive
  139. .Pp
  140. On context creation, the state of the previous context is copied. Each context
  141. remembers its last visited directory.
  142. .Pp
  143. Each context can have its own directory color specified. See ENVIRONMENT
  144. section.
  145. .Sh SESSIONS
  146. Sessions are a way to save and restore states of work. A session stores the
  147. settings and contexts.
  148. .Pp
  149. Sessions can be loaded dynamically from within a running
  150. .Nm
  151. instance, or with a program option.
  152. .Pp
  153. When a session is loaded dynamically, the last working session is saved
  154. automatically to a dedicated -- "last session" -- session file.
  155. .Pp
  156. All the session files are located by session name in the directory
  157. .Pp
  158. \fB${XDG_CONFIG_HOME:-$HOME/.config}/nnn/sessions\fR
  159. .Pp
  160. "@" is the "last session" file.
  161. .Sh FILTERS
  162. Filters are strings to find matching entries in the current directory
  163. instantly (\fIsearch-as-you-type\fR). There is a program option to switch to
  164. regex filters. Matches are case-insensitive by default. In each context the
  165. last filter is persisted at runtime or in saved sessions.
  166. .Pp
  167. Special keys at empty filter prompt:
  168. .Pp
  169. - toggle between string and regex: '/'
  170. .br
  171. - toggle case sensitivity: ':'
  172. .br
  173. - apply the last filter (or clear filter if non-empty): '^L'
  174. .br
  175. - show help and config screen: '?'
  176. .br
  177. - show command prompt: ']'
  178. .br
  179. - launch an application: '='
  180. .br
  181. - run a plugin by its key: ';'
  182. .br
  183. - pin current directory: ','
  184. .Pp
  185. Other noteworthy keys:
  186. .Pp
  187. - '^char': usual keybind functionality
  188. .br
  189. - 'Esc': exit filter prompt but skip dir refresh
  190. .Pp
  191. Common regex use cases:
  192. .Pp
  193. (1) To list all matches starting with the filter expression,
  194. start the expression with a '^' (caret) symbol.
  195. .br
  196. (2) Type '\\.mkv' to list all MKV files.
  197. .br
  198. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  199. .Pp
  200. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  201. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  202. .br
  203. When there's a unique match and it's a directory,
  204. .Nm
  205. auto selects the directory and enters it in this mode. Use the relevant
  206. program option to disable this behaviour.
  207. .Sh SELECTION
  208. There are 3 groups of keybinds to add files to selection:
  209. .Pp
  210. (1) hovered file selection toggle (deselects if '+' is visible before the
  211. entry, else adds to selection)
  212. .br
  213. (2) add a range of files to selection (repeat the range key on the same entry
  214. twice to clear selection completely)
  215. .br
  216. (3) add all files in the current directory to selection
  217. .Pp
  218. A selection can be edited, copied, moved, removed, archived or linked.
  219. .Pp
  220. Absolute paths of the selected files are copied to \fB.selection\fR file in
  221. the config directory.
  222. .Pp
  223. To edit the selection use the _edit selection_ key. Use this key to remove a
  224. file from selection after you navigate away from its directory. Editing doesn't
  225. end the selection mode. You can add more files to the selection and edit the
  226. list again. If no file is selected in the current session, this option attempts
  227. to list the selection file.
  228. .Sh UNITS
  229. The minimum file size unit is byte (B). The rest are K, M, G, T, P, E, Z, Y
  230. (powers of 1024), same as the default units in \fIls\fR.
  231. .Sh ENVIRONMENT
  232. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take
  233. precedence when dealing with the !, e and p commands respectively. A single
  234. combination to arguments is supported for SHELL and PAGER.
  235. .Pp
  236. \fBNNN_OPENER:\fR specify a custom file opener.
  237. .Bd -literal
  238. export NNN_OPENER=nuke
  239. NOTE: `nuke` is a file opener available in plugin repository
  240. .Ed
  241. .Pp
  242. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs
  243. (max 10) separated by \fI;\fR:
  244. .Bd -literal
  245. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  246. NOTE: To go to a bookmark, press the Lead key followed by the bookmark key.
  247. .Ed
  248. .Pp
  249. \fBNNN_PLUG:\fR directly executable plugins as \fIkey_char:location\fR pairs
  250. (max 15) separated by \fI;\fR:
  251. .Bd -literal
  252. export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;t:imgthumb'
  253. NOTES:
  254. 1. To run a plugin directly, press \fI;\fR followed by the plugin key
  255. 2. To skip directory refresh after running a plugin,prefix with \fB-\fR
  256. export NNN_PLUG='m:-mediainfo'
  257. .Ed
  258. .Pp
  259. To assign keys to arbitrary non-background non-shell-interpreted cli
  260. commands and invoke like plugins, add \fI_\fR (underscore) before the
  261. command.
  262. .Bd -literal
  263. export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn;o:fzopen'
  264. NOTES:
  265. 1. Use single quotes for $NNN_PLUG so $nnn is not interpreted
  266. 2. $nnn should be the last argument (IF used)
  267. 3. (Again) add \fB_\fR before the command
  268. 4. To disable directory refresh after running a \fIcommand as plugin\fR,
  269. prefix with \fB-_\fR
  270. 5. To skip user confirmation after command execution, suffix with \fB*\fR
  271. export NNN_PLUG='y:-_sync*'
  272. EXAMPLES:
  273. ----------------------------------- + -------------------------------------------------
  274. Key:Command | Description
  275. ----------------------------------- + -------------------------------------------------
  276. e:-_vi $nnn* | Edit hovered file in vi
  277. k:-_fuser -kiv $nnn* | Interactively kill process(es) using hovered file
  278. l:_git log | Show git log
  279. n:-_vi /home/user/Dropbox/dir/note* | Take quick notes in a synced file/dir of notes
  280. p:-_less -iR $nnn* | Page through hovered file in less
  281. s:_smplayer -minigui $nnn* | Play hovered media file, even unfinished download
  282. x:_chmod +x $nnn | Make the hovered file executable
  283. y:-_sync* | Flush cached writes
  284. ----------------------------------- + -------------------------------------------------
  285. .Ed
  286. .Pp
  287. \fBNNN_USE_EDITOR:\fR use VISUAL (else EDITOR, preferably CLI, fallback vi)
  288. to handle text files.
  289. .Bd -literal
  290. export NNN_USE_EDITOR=1
  291. .Ed
  292. .Pp
  293. \fBNNN_CONTEXT_COLORS:\fR string of color codes for each context, e.g.:
  294. .Bd -literal
  295. export NNN_CONTEXT_COLORS='1234'
  296. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  297. .Ed
  298. .Pp
  299. \fBNNN_SSHFS_OPTS:\fR pass additional options to sshfs command:
  300. .Bd -literal
  301. export NNN_SSHFS_OPTS='sshfs -o reconnect,idmap=user,cache_timeout=3600'
  302. NOTE: The options must be preceded by `sshfs` and comma-separated without any space between them.
  303. .Ed
  304. .Pp
  305. \fBNNN_RCLONE_OPTS:\fR pass additional options to rclone command:
  306. .Bd -literal
  307. export NNN_RCLONE_OPTS='rclone mount --read-only --no-checksum'
  308. NOTE: The options must be preceded by `rclone` and max 5 flags are supported.
  309. .Ed
  310. .Pp
  311. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal locker
  312. (default: disabled).
  313. .Pp
  314. \fBNNN_TRASH:\fR trash (instead of \fIdelete\fR) files to desktop Trash.
  315. .Bd -literal
  316. export NNN_TRASH=1
  317. .Ed
  318. .Pp
  319. \fBnnn:\fR this is a special variable set to the hovered entry before executing
  320. a command from the command prompt or spawning a shell.
  321. .Sh KNOWN ISSUES
  322. .Nm
  323. may not handle keypresses correctly when used with tmux (see issue #104 for
  324. more details). Set \fBTERM=xterm-256color\fR to address it.
  325. .Sh AUTHORS
  326. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com ,
  327. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  328. .An Dimitris Papastamos Aq Mt sin@2f30.org .
  329. .Sh HOME
  330. .Em https://github.com/jarun/nnn