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.
 
 
 
 
 
 

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