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.
 
 
 
 
 
 

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