My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

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