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.
 
 
 
 
 
 

235 rindas
7.8 KiB

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