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.
 
 
 
 
 
 

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