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.
 
 
 
 
 
 

281 lines
7.2 KiB

  1. .Dd Feb 28, 2018
  2. .Dt NNN 1
  3. .Os
  4. .Sh NAME
  5. .Nm nnn
  6. .Nd the missing terminal file browser for X
  7. .Sh SYNOPSIS
  8. .Nm
  9. .Op Ar -b key
  10. .Op Ar -c N
  11. .Op Ar -e
  12. .Op Ar -i
  13. .Op Ar -l
  14. .Op Ar -p nlay
  15. .Op Ar -S
  16. .Op Ar -v
  17. .Op Ar -h
  18. .Op Ar PATH
  19. .Sh DESCRIPTION
  20. .Nm
  21. (Noice is Not Noice) is a performance-optimized, feature-packed fork of the noice terminal file browser with seamless desktop integration, simplified navigation, \fInavigate-as-you-type\fR mode, bookmarks, disk usage analyzer mode, comprehensive file details and much more. It remains a simple and efficient file browser that stays out of your way.
  22. .Pp
  23. .Nm
  24. opens the current working directory by default if
  25. .Ar PATH
  26. is not specified.
  27. .Pp
  28. .Nm
  29. supports both vi-like and emacs-like key bindings in the default
  30. configuration. The default key bindings are listed below.
  31. .Pp
  32. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  33. .It Ic [Up], k, ^P
  34. Move to previous entry
  35. .It Ic [Down], j, ^N
  36. Move to next entry
  37. .It Ic [PgUp], ^U
  38. Scroll up half a page
  39. .It Ic [PgDn], ^D
  40. Scroll down half a page
  41. .It Ic [Home], g, ^, ^A
  42. Move to the first entry
  43. .It Ic [End], G, $, ^E
  44. Move to the last entry
  45. .It Ic [Right], [Enter], l, ^M
  46. Open file or enter directory
  47. .It Ic [Left], [Backspace], h, ^H
  48. Back up one directory level
  49. .It Ic ^O
  50. Open with a custom application
  51. .It Ic [Insert], ^I
  52. Toggle navigate-as-you-type mode
  53. .It Ic ~
  54. Change to the HOME directory
  55. .It Ic &
  56. Change to initial directory
  57. .It Ic -
  58. Change to the last visited directory
  59. .It Ic /
  60. Change filter (more information below)
  61. .It Ic ^/
  62. Search directory in desktop search tool
  63. .It Ic \&.
  64. Toggle show hidden . (dot) files
  65. .It Ic ^B
  66. Show bookmark key prompt
  67. .It Ic b
  68. Pin current directory
  69. .It Ic ^V
  70. Visit pinned directory
  71. .It Ic c
  72. Show change directory prompt
  73. .It Ic d
  74. Toggle detail view
  75. .It Ic D
  76. Show current file details screen
  77. .It Ic m
  78. Show brief media info
  79. .It Ic M
  80. Show full media info
  81. .It Ic n
  82. Create a new file or directory
  83. .It Ic ^R
  84. Rename selected entry
  85. .It Ic r
  86. Open directory in vidir
  87. .It Ic s
  88. Toggle sort by file size
  89. .It Ic S, ^J
  90. Toggle disk usage analyzer mode
  91. .It Ic t
  92. Toggle sort by time modified
  93. .It Ic \&!, ^]
  94. Spawn SHELL in PWD (fallback sh)
  95. .It Ic R
  96. Run a custom script
  97. .It Ic e
  98. Open current entry in EDITOR (fallback vi)
  99. .It Ic o
  100. Open directory in NNN_DE_FILE_MANAGER
  101. .It Ic p
  102. Open current entry in PAGER (fallback less)
  103. .It Ic f
  104. Archive current entry
  105. .It Ic F
  106. List files in archive
  107. .It Ic ^F
  108. Extract archive in current directory
  109. .It Ic ^K
  110. Invoke file path copier
  111. .It Ic ^Y
  112. Toggle multiple file path copy mode
  113. .It Ic ^T
  114. Toggle path quote
  115. .It Ic ^L
  116. Force a redraw, clear rename or filter prompt
  117. .It Ic L
  118. Lock terminal (Linux only)
  119. .It Ic \&?
  120. Toggle help and settings screen
  121. .It Ic Q, ^G
  122. Quit and change directory
  123. .It Ic q, ^X
  124. Quit
  125. .El
  126. .Pp
  127. Backing up one directory level will set the cursor position at the
  128. directory you came out of.
  129. .Pp
  130. Help & settings, file details, media info and archive listing are shown in the
  131. PAGER. Please use the PAGER-specific keys in these screens.
  132. .Pp
  133. .Nm
  134. supports the following options:
  135. .Pp
  136. .Fl "b key"
  137. specify bookmark key to open
  138. .Pp
  139. .Fl "c N"
  140. specify dir color (default blue), disables if N>7
  141. 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white
  142. .Pp
  143. .Fl e
  144. use exiftool instead of mediainfo
  145. .Pp
  146. .Fl i
  147. start in navigate-as-you-type mode
  148. .Pp
  149. .Fl l
  150. start in light mode (fewer details)
  151. .Pp
  152. .Fl "p nlay"
  153. path to custom nlay
  154. .Pp
  155. .Fl S
  156. start in disk usage analyzer mode
  157. .Pp
  158. .Fl v
  159. show version and exit
  160. .Pp
  161. .Fl h
  162. show program help and exit
  163. .Sh CONFIGURATION
  164. .Nm
  165. uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on OS X) as the desktop
  166. opener. It invokes
  167. .Pa nlay
  168. to run desktop search utility or screensaver. Read more on
  169. .Pa nlay
  170. at:
  171. .br
  172. .Em https://github.com/jarun/nnn/wiki/all-about-nlay
  173. .Pp
  174. There is no configuration file. Settings work on environment variables. Please
  175. refer to the ENVIRONMENT section below.
  176. .Pp
  177. Configuring
  178. .Nm
  179. to change to the last visited directory on quit requires shell integration in a
  180. few easy steps. Please visit the project page (linked below) for the
  181. instructions.
  182. .Sh FILTERS
  183. Filters support regexes to instantly (search-as-you-type) list the matching
  184. entries in the current directory.
  185. .Pp
  186. There are 3 ways to reset a filter:
  187. .Pp
  188. (1) pressing \fI^L\fR (at the new/rename prompt \fI^L\fR followed by \fIEnter\fR
  189. discards all changes and exits prompt),
  190. .br
  191. (2) a search with no matches or
  192. .br
  193. (3) an extra backspace at the filter prompt (like vi).
  194. .Pp
  195. Common use cases:
  196. .Pp
  197. (1) To list all matches starting with the filter expression, start the expression
  198. with a '^' (caret) symbol.
  199. .br
  200. (2) Type '\\.mkv' to list all MKV files.
  201. .Pp
  202. If
  203. .Nm
  204. is invoked as root or the environment variable \fBNNN_SHOW_HIDDEN\fR is set the default filter will also match hidden files.
  205. .Pp
  206. In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
  207. allowing continuous navigation. Works best with the \fBarrow keys\fR.
  208. .Sh MULTI-COPY MODE
  209. The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
  210. NNN_COPIER is set (see ENVIRONMENT section below).
  211. .Pp
  212. To copy multiple file paths the multi-copy mode should be enabled using \fI^Y\fR.
  213. In this mode it's possible to
  214. .Pp
  215. (1) select multiple files one by one by pressing \fI^K\fR on each entry; or,
  216. .br
  217. (2) navigate to another file in the same directory to select a range of files.
  218. .Pp
  219. Pressing \fI^Y\fR again copies the paths to clipboard and exits the multi-copy mode.
  220. .Sh ENVIRONMENT
  221. The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
  222. when dealing with the !, e and p commands respectively.
  223. .Pp
  224. \fBNNN_BMS:\fR bookmark string as \fIkey:location\fR pairs (max 10) separated by
  225. \fI;\fR:
  226. .Bd -literal
  227. export NNN_BMS='doc:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
  228. .Ed
  229. The bookmark prompt also understands the \fI~\fR (HOME), \fI-\fR (last visited directory) and \fI&\fR shortcuts.
  230. .Pp
  231. \fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
  232. files.
  233. .Bd -literal
  234. export NNN_USE_EDITOR=1
  235. .Ed
  236. .Pp
  237. \fBNNN_DE_FILE_MANAGER:\fR set to a desktop file manager to open the current
  238. directory with. E.g.:
  239. .Bd -literal
  240. export NNN_DE_FILE_MANAGER=thunar
  241. .Ed
  242. .Pp
  243. \fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal
  244. screensaver.
  245. .Pp
  246. \fBNNN_COPIER:\fR set to a clipboard copier script. For example, on Linux:
  247. .Bd -literal
  248. -------------------------------------
  249. #!/bin/sh
  250. # comment the next line to convert newlines to spaces
  251. IFS=
  252. echo -n $1 | xsel --clipboard --input
  253. -------------------------------------
  254. .Ed
  255. .Pp
  256. \fBNNN_NO_X:\fR X display is unavailable. Copy file path(s) to \fI/tmp/nnncp$USER\fR.
  257. .Bd -literal
  258. export NNN_NO_X=1
  259. .Ed
  260. .Pp
  261. \fBNNN_QUOTE_ON:\fR wrap copied paths within single quotes. Useful for pasting
  262. names in the shell.
  263. .Pp
  264. \fBNNN_SCRIPT:\fR path to a custom script to run.
  265. .Bd -literal
  266. export NNN_SCRIPT=/usr/local/bin/script.sh
  267. .Ed
  268. \fBNNN_SHOW_HIDDEN:\fR show hidden files.
  269. .Bd -literal
  270. export NNN_SHOW_HIDDEN=1
  271. .Ed
  272. .Sh KNOWN ISSUES
  273. If you are using urxvt you might have to set backspacekey to DEC.
  274. .Sh AUTHORS
  275. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  276. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  277. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  278. .Sh HOME
  279. .Em https://github.com/jarun/nnn