My build of nnn with minor changes
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

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