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.

nnn.1 4.3 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. .Dd August 21, 2016
  2. .Dt NNN 1
  3. .Os
  4. .Sh NAME
  5. .Nm nnn
  6. .Nd free, fast, friendly file browser
  7. .Sh SYNOPSIS
  8. .Nm nnn
  9. .Op Ar dir
  10. .Sh DESCRIPTION
  11. .Nm
  12. (Noice is Not Noice) is a fork of the noice terminal file browser with improved desktop integration, file associations and navigation. It remains a simple and efficient file browser that stays out of your way.
  13. .Pp
  14. .Nm
  15. defaults to the current directory if
  16. .Ar dir
  17. is not specified.
  18. .Pp
  19. .Nm
  20. supports both vi-like and emacs-like key bindings in the default
  21. configuration. The default key bindings are listed below.
  22. .Pp
  23. .Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
  24. .It Ic k, [Up] or C-p
  25. Move to previous entry.
  26. .It Ic j, [Down] or C-n
  27. Move to next entry.
  28. .It Ic [Pgup] or C-u
  29. Scroll up half a page.
  30. .It Ic [Pgdown] or C-d
  31. Scroll down half a page.
  32. .It Ic [Home], ^ or C-a
  33. Move to the first entry.
  34. .It Ic [End], $ or C-e
  35. Move to the last entry.
  36. .It Ic l, [Right], [Return] or C-m
  37. Open file or enter directory.
  38. .It Ic h, C-h, [Left] or [Backspace]
  39. Back up one directory level.
  40. .It Ic ~
  41. Change to the HOME directory.
  42. .It Ic / or &
  43. Change filter (see below for more information).
  44. .It Ic c
  45. Change into the given directory.
  46. .It Ic d
  47. Toggle detail view.
  48. .It Ic \&.
  49. Toggle hide .dot files.
  50. .It Ic s
  51. Toggle sort by file size.
  52. .It Ic t
  53. Toggle sort by time modified.
  54. .It Ic \&!
  55. Spawn a shell in current directory.
  56. .It Ic z
  57. Run the system top utility.
  58. .It Ic e
  59. Open selected entry with the vi editor.
  60. .It Ic p
  61. Open selected entry with the less pager.
  62. .It Ic C-k
  63. Invoke file name copier.
  64. .It Ic C-l
  65. Force a redraw.
  66. .It Ic q
  67. Quit.
  68. .El
  69. .Pp
  70. Backing up one directory level will set the cursor position at the
  71. directory you came out of.
  72. .Sh CONFIGURATION
  73. .Nm
  74. is configured by modifying
  75. .Pa config.h
  76. and recompiling the code.
  77. .Pp
  78. Environment variable
  79. .Ar NNN_OPENER
  80. overrides all hard-coded file associations.
  81. .Pp
  82. Hard-coded associations are specified by regexes matching on the currently selected filename. If a match is found the associated program is executed with the filename passed in as the argument. If no match is found the environment variable
  83. .Ar NNN_FALLBACK_OPENER
  84. is invoked, if set.
  85. .Pp
  86. No particular utility is set as the default opener as no standalone universal opener for all mime types exists.
  87. .Pp
  88. See the examples section below for more information.
  89. .Sh FILTERS
  90. Filters support regexes to display only the matched
  91. entries in the current directory view. This effectively allows
  92. searching through the directory tree for a particular entry.
  93. .Pp
  94. Filters do not stack on top of each other. They are applied anew
  95. every time.
  96. .Pp
  97. To reset the filter you can input an empty filter expression.
  98. .Pp
  99. If
  100. .Nm
  101. is invoked as root the default filter will also match hidden
  102. files.
  103. .Sh ENVIRONMENT
  104. The SHELL, EDITOR and PAGER environment variables take precedence
  105. when dealing with the !, e and p commands respectively.
  106. .Pp
  107. \fBNNN_OPENER:\fR set to your desktop environment's default
  108. mime opener to override all custom mime associations.
  109. .br
  110. Examples: xdg-open, gnome-open, gvfs-open.
  111. .Pp
  112. \fBNNN_FALLBACK_OPENER:\fR set to your desktop environment's default
  113. mime opener to use as a fallback when no association is set for a file
  114. type. Custom associations are listed in the EXAMPLES section below.
  115. .Pp
  116. \fBNNN_COPIER:\fR set to a clipboard copier script. For example, on Linux:
  117. .Bd -literal
  118. -------------------------------------
  119. #!/bin/sh
  120. echo -n $1 | xsel --clipboard --input
  121. -------------------------------------
  122. .Sh EXAMPLES
  123. The following example shows one possible configuration for
  124. file associations which is also the default if environment
  125. variable NNN_OPENER is not set:
  126. .Bd -literal
  127. -----------------------------------------------
  128. struct assoc assocs[] = {
  129. { "\\.(c|cpp|h|txt|log)$", "vim" },
  130. { "\\.(wma|mp3|ogg|flac)$", "fmedia" },
  131. { "\\.pdf$", "zathura" },
  132. { "\\.sh$", "sh" },
  133. };
  134. -----------------------------------------------
  135. Plain text files are opened with vim.
  136. .br
  137. Any other file types are opened with the 'xdg-open' command.
  138. .Ed
  139. .Sh KNOWN ISSUES
  140. If you are using urxvt you might have to set backspacekey to DEC.
  141. .Sh AUTHORS
  142. .An Lazaros Koromilas Aq Mt lostd@2f30.org ,
  143. .An Dimitris Papastamos Aq Mt sin@2f30.org ,
  144. .An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
  145. .Sh HOME
  146. https://github.com/jarun/nnn