My build of nnn with minor changes
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

před 10 roky
před 10 roky
před 5 roky
před 4 roky
před 4 roky
před 7 roky
před 7 roky
před 10 roky
před 10 roky
před 7 roky
před 4 roky
před 4 roky
před 4 roky
před 7 roky
před 10 roky
před 5 roky
před 5 roky
před 5 roky
před 10 roky
před 4 roky
před 4 roky
před 5 roky
před 5 roky
před 4 roky
před 5 roky
před 4 roky
před 4 roky
před 4 roky
před 7 roky
před 4 roky
před 7 roky
před 4 roky
před 7 roky
před 4 roky
před 4 roky
před 4 roky
před 4 roky
před 5 roky
před 4 roky
před 5 roky
před 4 roky
před 5 roky
před 4 roky
před 4 roky
před 4 roky
před 5 roky
před 5 roky
před 10 roky
před 5 roky
před 5 roky
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. .Dd Feb 12, 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 -f
  17. .Op Ar -g
  18. .Op Ar -H
  19. .Op Ar -K
  20. .Op Ar -n
  21. .Op Ar -p file
  22. .Op Ar -Q
  23. .Op Ar -r
  24. .Op Ar -R
  25. .Op Ar -s name
  26. .Op Ar -S
  27. .Op Ar -t secs
  28. .Op Ar -T key
  29. .Op Ar -V
  30. .Op Ar -x
  31. .Op Ar -h
  32. .Op Ar PATH
  33. .Sh DESCRIPTION
  34. .Nm
  35. (Nnn's Not Noice) is a performance-optimized, feature-packed fork of
  36. noice (http://git.2f30.org/noice/) with seamless desktop
  37. integration, simplified navigation, \fInavigate-as-you-type\fR mode with
  38. auto select, disk usage analyzer mode, bookmarks, contexts, application
  39. launcher, familiar navigation shortcuts, subshell spawning and much
  40. more.It remains a simple and efficient file manager that stays out of your way.
  41. .Pp
  42. .Nm
  43. opens the current working directory by default if
  44. .Ar PATH
  45. is not specified.
  46. .Sh KEYBINDS
  47. .Pp
  48. Press \fB?\fR in
  49. .Nm
  50. to see the list of keybinds.
  51. .Sh OPTIONS
  52. .Pp
  53. .Nm
  54. supports the following options:
  55. .Pp
  56. .Fl a
  57. use access time for all operations (default: modification time)
  58. .Pp
  59. .Fl A
  60. disable directory auto-select in navigate-as-you-type mode
  61. .Pp
  62. .Fl "b key"
  63. specify bookmark key to open
  64. .Pp
  65. .Fl c
  66. opener opens files in cli utilities only (overrides -e)
  67. .Pp
  68. .Fl d
  69. detail mode
  70. .Pp
  71. .Fl e
  72. open text files in $VISUAL (else $EDITOR, fallback vi) [preferably CLI]
  73. .Pp
  74. .Fl E
  75. use $EDITOR for internal undetached edits
  76. .Pp
  77. .Fl f
  78. use readline history file
  79. .Pp
  80. .Fl g
  81. use regex filters instead of substring match
  82. .Pp
  83. .Fl H
  84. show hidden files
  85. .Pp
  86. .Fl K
  87. test for keybind collision
  88. .Pp
  89. .Fl n
  90. start in navigate-as-you-type mode
  91. .Pp
  92. .Fl o
  93. open files only on Enter key
  94. .Pp
  95. .Fl "p file"
  96. copy (or \fIpick\fR) selection to file, or stdout if file='-'
  97. .Pp
  98. .Fl Q
  99. disable confirmation on quit with multiple contexts active
  100. .Pp
  101. .Fl r
  102. show cp, mv progress
  103. (Linux-only, needs advcpmv; '^T' shows the progress on BSD/macOS)
  104. .Pp
  105. .Fl R
  106. disable rollover at edges
  107. .Pp
  108. .Fl "s name"
  109. load a session by name
  110. .Pp
  111. .Fl S
  112. start in disk usage analyzer mode
  113. .Pp
  114. .Fl "t secs"
  115. idle timeout in seconds to lock terminal
  116. .Pp
  117. .Fl "T key"
  118. sort order
  119. keys: 'a'u / 'd'u / 'e'xtension / 'r'everse / 's'ize / 't'ime / 'v'ersion
  120. .Pp
  121. .Fl V
  122. show version and exit
  123. .Pp
  124. .Fl x
  125. show notis on selection cp, mv, rm completion
  126. copy path to system clipboard on select
  127. .Pp
  128. .Fl h
  129. show program help and exit
  130. .Sh CONFIGURATION
  131. There is no configuration file. Associated files are at
  132. .Pp
  133. \fB${XDG_CONFIG_HOME:-$HOME/.config}/nnn/\fR
  134. .Pp
  135. Configuration is done using a few optional (set if you need) environment
  136. variables. See ENVIRONMENT section.
  137. .Pp
  138. .Nm
  139. uses \fIxdg-open\fR (on Linux), \fIopen(1)\fR (on macOS), \fIcygstart\fR on
  140. (Cygwin) and \fIopen\fR on (Haiku) as the desktop opener. It's also possible
  141. to specify a custom opener. See ENVIRONMENT section.
  142. .Sh CONTEXTS
  143. Contexts serve the purpose of exploring multiple directories simultaneously. 4
  144. contexts are available. The status of the contexts are shown in the top left
  145. corner:
  146. .Pp
  147. - the current context is in reverse video
  148. .br
  149. - other active contexts are underlined
  150. .br
  151. - rest are inactive
  152. .Pp
  153. On context creation, the state of the previous context is copied. Each context
  154. remembers its last visited directory.
  155. .Pp
  156. Each context can have its own directory color specified. See ENVIRONMENT
  157. section.
  158. .Sh SESSIONS
  159. Sessions are a way to save and restore states of work. A session stores the
  160. settings and contexts.
  161. .Pp
  162. Sessions can be loaded dynamically from within a running
  163. .Nm
  164. instance, or with a program option.
  165. .Pp
  166. When a session is loaded dynamically, the last working session is saved
  167. automatically to a dedicated -- "last session" -- session file.
  168. .Pp
  169. All the session files are located by session name in the directory
  170. .Pp
  171. \fB${XDG_CONFIG_HOME:-$HOME/.config}/nnn/sessions\fR
  172. .Pp
  173. "@" is the "last session" file.
  174. .Sh FILTERS
  175. Filters are strings to find matching entries in the current directory
  176. instantly (\fIsearch-as-you-type\fR). There is a program option to switch to
  177. regex filters. Matches are case-insensitive by default. In each context the
  178. last filter is persisted at runtime or in saved sessions.
  179. .Pp
  180. Special keys at filter prompt:
  181. .Bd -literal
  182. ------ + ---------------------------------------
  183. Key | Function
  184. ------ + ---------------------------------------
  185. ^char | Usual keybind functionality
  186. Esc | Exit filter prompt but skip dir refresh
  187. ------ + ---------------------------------------
  188. .Ed
  189. .Pp
  190. Special keys at \fBempty filter prompt\fR:
  191. .Bd -literal
  192. ------ + ---------------------------------------
  193. Key | Function
  194. ------ + ---------------------------------------
  195. ? | Show help and config screen
  196. / | Toggle between string and regex
  197. : | Toggle case-sensitivity
  198. ^L | Clear filter (\fIif prompt is non-empty\fR)
  199. | OR apply last filter
  200. ------ + ---------------------------------------
  201. .Ed
  202. .Pp
  203. Additional special keys at \fBempty filter prompt\fR
  204. in \fBnav-as-you-type\fR mode:
  205. .Bd -literal
  206. ------ + ------------------------
  207. Key | Function
  208. ------ + ------------------------
  209. ' | Go to first non-dir file
  210. + | Toggle proceed on open
  211. , | Pin CWD
  212. - | Go to last visited dir
  213. . | Show hidden files
  214. ; | Run a plugin by its key
  215. = | Launch a GUI application
  216. @ | Visit start dir
  217. ] | Show command prompt
  218. ` | Visit /
  219. ~ | Go HOME
  220. ------ + ------------------------
  221. .Ed
  222. .Pp
  223. Common regex use cases:
  224. .Pp
  225. (1) To list all matches starting with the filter expression,
  226. start the expression with a '^' (caret) symbol.
  227. .br
  228. (2) Type '\\.mkv' to list all MKV files.
  229. .br
  230. (3) Use '.*' to match any character (\fIsort of\fR fuzzy search).
  231. .Pp
  232. In the \fInavigate-as-you-type\fR mode directories are opened in filter
  233. mode, allowing continuous navigation. Works best with the \fBarrow keys\fR.
  234. .br
  235. When there's a unique match and it's a directory,
  236. .Nm
  237. auto selects the directory and enters it in this mode. Use the relevant
  238. program option to disable this behaviour.
  239. .Sh SELECTION
  240. .Nm
  241. allows file selection across directories and contexts!
  242. .Pp
  243. There are 3 groups of keybinds to add files to selection:
  244. .Pp
  245. (1) hovered file selection toggle (deselects if '+' is visible before the
  246. entry, else adds to selection)
  247. .br
  248. (2) add a range of files to selection (repeat the range key on the same entry
  249. twice to clear selection completely)
  250. .br
  251. (3) add all files in the current directory to selection
  252. .Pp
  253. A selection can be edited, copied, moved, removed, archived or linked.
  254. .Pp
  255. Absolute paths of the selected files are copied to \fB.selection\fR file in
  256. the config directory.
  257. .Pp
  258. To edit the selection use the _edit selection_ key. Use this key to remove a
  259. file from selection after you navigate away from its directory. Editing doesn't
  260. end the selection mode. You can add more files to the selection and edit the
  261. list again. If no file is selected in the current session, this option attempts
  262. to list the selection file.
  263. .Sh LIST FILES
  264. .Nm
  265. can receive a list of files as input. The paths should be NUL-separated ('\\0')
  266. but doesn't need to be NUL-terminated. Paths and can be relative to the current
  267. directory or absolute.
  268. .Pp
  269. Input is limited by 65,536 paths or 256 MiB of input.
  270. .Pp
  271. Start
  272. .Nm
  273. in this mode by writing to its standard input. So the output of another command
  274. can be piped to it. For example, to list files in current directory larger than
  275. 1M:
  276. .Bd -literal
  277. find -maxdepth 1 -size +1M -print0 | nnn
  278. .Ed
  279. .Pp
  280. or you can redirect a list from a file:
  281. .Bd -literal
  282. nnn < files.txt
  283. .Ed
  284. .Pp
  285. A temporary directory will be created containing symlinks to the given
  286. paths. Any action performed on these symlinks will be performed only on their
  287. targets, after which they might become invalid.
  288. .Pp
  289. Though the term "files" is used, any input is valid as long as it's a valid
  290. path. \fBInvalid paths are ignored.\fR
  291. .Sh UNITS
  292. The minimum file size unit is byte (B). The rest are K, M, G, T, P, E, Z, Y
  293. (powers of 1024), same as the default units in \fIls\fR.
  294. .Sh ENVIRONMENT
  295. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables are
  296. used. A single combination of arguments is supported for SHELL and PAGER.
  297. .Pp
  298. \fBNNN_OPTS:\fR binary options to
  299. .Nm
  300. .Bd -literal
  301. export NNN_OPTS="cEnrx"
  302. .Ed
  303. .Pp
  304. \fBNNN_OPENER:\fR specify a custom file opener.
  305. .Bd -literal
  306. export NNN_OPENER=nuke
  307. NOTE: 'nuke' is a file opener available in the plugin repository.
  308. .Ed
  309. .Pp
  310. \fBNNN_BMS:\fR bookmark string as \fIkey_char:location\fR pairs
  311. separated by \fI;\fR:
  312. .Bd -literal
  313. export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  314. .Ed
  315. .Pp
  316. \fBNNN_PLUG:\fR directly executable plugins as \fIkey_char:location\fR pairs
  317. separated by \fI;\fR:
  318. .Bd -literal
  319. export NNN_PLUG='o:fzopen;p:mocplay;d:diffs;m:nmount;t:imgthumb'
  320. NOTES:
  321. 1. To run a plugin directly, press \fI;\fR followed by the plugin key.
  322. 2. To skip directory refresh after running a plugin, prefix with \fB-\fR.
  323. export NNN_PLUG='m:-mediainfo'
  324. .Ed
  325. .Pp
  326. To assign keys to arbitrary non-background non-shell-interpreted cli
  327. commands and invoke like plugins, add \fI_\fR (underscore) before the
  328. command.
  329. .Bd -literal
  330. export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn;o:fzopen'
  331. NOTES:
  332. 1. Use single quotes for $NNN_PLUG so $nnn is not interpreted
  333. 2. $nnn should be the last argument (IF used)
  334. 3. (Again) add \fB_\fR before the command
  335. 4. To disable directory refresh after running a \fIcommand as plugin\fR,
  336. prefix with \fB-_\fR
  337. 5. To skip user confirmation after command execution, suffix with \fB*\fR
  338. export NNN_PLUG='y:-_sync*'
  339. 6. To run a \fIGUI app as plugin\fR, add a \fB|\fR after \fB_\fR
  340. export NNN_PLUG='m:-_|mousepad $nnn'
  341. EXAMPLES:
  342. ----------------------------------- + -------------------------------------------------
  343. Key:Command | Description
  344. ----------------------------------- + -------------------------------------------------
  345. k:-_fuser -kiv $nnn* | Interactively kill process(es) using hovered file
  346. l:_git log | Show git log
  347. n:-_vi /home/user/Dropbox/dir/note* | Take quick notes in a synced file/dir of notes
  348. p:-_less -iR $nnn* | Page through hovered file in less
  349. s:-_|smplayer -minigui $nnn | Play hovered media file, even unfinished download
  350. x:_chmod +x $nnn | Make the hovered file executable
  351. y:-_sync* | Flush cached writes
  352. ----------------------------------- + -------------------------------------------------
  353. .Ed
  354. .Pp
  355. \fBNNN_COLORS:\fR string of color codes for each context, e.g.:
  356. .Bd -literal
  357. export NNN_COLORS='1234'
  358. codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
  359. .Ed
  360. .Pp
  361. \fBNNN_ARCHIVE:\fR archive types to be handled silently (default: bzip2, (g)zip, tar).
  362. .Bd -literal
  363. export NNN_ARCHIVE="\\\\.(7z|bz2|gz|tar|tgz|zip)$"
  364. NOTE: Non-default formats may require a third-party utility.
  365. .Ed
  366. .Pp
  367. \fBNNN_SSHFS:\fR pass additional options to sshfs command:
  368. .Bd -literal
  369. export NNN_SSHFS='sshfs -o reconnect,idmap=user,cache_timeout=3600'
  370. NOTE: The options must be preceded by "sshfs" and comma-separated without any space between them.
  371. .Ed
  372. .Pp
  373. \fBNNN_RCLONE:\fR pass additional options to rclone command:
  374. .Bd -literal
  375. export NNN_RCLONE='rclone mount --read-only --no-checksum'
  376. NOTE: The options must be preceded by "rclone" and max 5 flags are supported.
  377. .Ed
  378. .Pp
  379. \fBNNN_TRASH:\fR trash (instead of \fIdelete\fR) files to desktop Trash.
  380. .Bd -literal
  381. export NNN_TRASH=1
  382. .Ed
  383. .Pp
  384. \fBNNN_MCLICK:\fR key emulated by a middle mouse click.
  385. .Bd -literal
  386. export NNN_MCLICK='^R'
  387. NOTE: Only the first character is considered if not a \fICtrl+key\fR combo.
  388. .Ed
  389. .Pp
  390. \fBnnn:\fR this is a special variable set to the hovered entry before executing
  391. a command from the command prompt or spawning a shell.
  392. .Sh KNOWN ISSUES
  393. .Nm
  394. may not handle keypresses correctly when used with tmux (see issue #104 for
  395. more details). Set \fBTERM=xterm-256color\fR to address it.
  396. .Sh AUTHORS
  397. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com ,
  398. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  399. .An Dimitris Papastamos Aq Mt sin@2f30.org .
  400. .Sh HOME
  401. .Em https://github.com/jarun/nnn