1NNN(1) BSD General Commands Manual NNN(1)
2
4 nnn — the missing terminal file manager for X
5
7 nnn [-b key] [-d] [-e] [-i] [-l] [-n] [-p file] [-s] [-S] [-v] [-w] [-h]
8 [PATH]
9
11 nnn (Noice is Not Noice) is a performance-optimized, feature-packed fork
12 of noice (http://git.2f30.org/noice/) with seamless desktop integration,
13 simplified navigation, navigate-as-you-type mode with auto select, disk
14 usage analyzer mode, bookmarks, contexts, application launcher, familiar
15 navigation shortcuts, subshell spawning and much more. It remains a sim‐
16 ple and efficient file manager that stays out of your way.
17
18 nnn opens the current working directory by default if PATH is not speci‐
19 fied.
20
22 Press ? in nnn to see the list of keybinds.
23
25 nnn supports the following options:
26
27 -b key
28 specify bookmark key to open
29
30 -d
31 show hidden files
32
33 -e
34 use exiftool instead of mediainfo
35
36 -i
37 start in navigate-as-you-type mode
38
39 -l
40 start in light mode (fewer details)
41
42 -n
43 use version compare to sort files
44
45 -p file
46 copy (or pick) selection to file, or stdout if file='-'
47
48 -s
49 use substring match for filters instead of regex
50
51 -S
52 start in disk usage analyzer mode
53
54 -v
55 show version and exit
56
57 -w
58 wild load - entries unsorted on directory load
59
60 -h
61 show program help and exit
62
64 nnn uses xdg-open (on Linux) and open(1) (on macOS) as the desktop
65 opener.
66
67 There is no configuration file. Settings work on environment variables.
68 See ENVIRONMENT section below.
69
70 Configuring nnn to change to the last visited directory on quit requires
71 shell integration in a few easy steps. Look up NNN_TMPFILE in the ENVI‐
72 RONMENT section below.
73
75 Contexts serve the purpose of exploring multiple directories simultane‐
76 ously. 4 contexts are available. The status of the contexts are shown in
77 the top left corner:
78
79 - the current context is in reverse
80 - other active contexts are underlined
81 - rest are inactive
82
83 To switch to a context press the Leader key followed by the context num‐
84 ber (1-4).
85
86 The first time a context is entered, it copies the state of the last vis‐
87 ited context. Each context remembers its last visited directory.
88
89 When a context is quit, the next active context is selected. If the last
90 active context is quit, the program quits.
91
92 Each context can have its own directory color specified. See ENVIRONMENT
93 section below.
94
96 Filters support regexes (default) to instantly (search-as-you-type) list
97 the matching entries in the current directory.
98
99 Common use cases:
100
101 (1) To list all matches starting with the filter expression, start the
102 expression with a '^' (caret) symbol.
103 (2) Type '\.mkv' to list all MKV files.
104 (3) Use '.*' to match any character (sort of fuzzy search).
105
106 There is a program option to filter entries by substring match instead of
107 regex.
108
109 In the navigate-as-you-type mode directories are opened in filter mode,
110 allowing continuous navigation. Works best with the arrow keys.
111 When there's a unique match and it's a directory, `nnn` auto selects the
112 directory and enters it in this mode.
113 The wild load option can be extremely handy for users who use the navi‐
114 gate-as-you-type mode constantly. The entries are unsorted when the
115 directory loads. Applying filters sorts the entries (with directories on
116 top). Directory color is disabled in this mode.
117
119 Use ^K to select the file under the cursor.
120
121 To select multiple files the selection mode should be enabled using ^Y.
122 In this mode it's possible to
123
124 (1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on
125 each entry (works across directories and contexts); or,
126 (2) navigate to another file in the same directory to select a range of
127 files.
128
129 Press ^Y again to save the selection and exit selection mode.
130
131 Selected files are visually indicated by a + before the entries.
132 The files in the list can now be listed, copied, moved, removed, archived
133 or linked.
134 Absolute paths of the selected files are copied to the temporary file
135 ~/.config/nnn/.selection. The path is shown in the help and configuration
136 screen. If $NNN_COPIER is set (see ENVIRONMENT section below) the file
137 paths are also copied to the system clipboard.
138
140 The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables
141 take precedence when dealing with the !, e and p commands respectively. A
142 single combination to arguments is supported for SHELL and PAGER.
143
144 NNN_BMS: bookmark string as key_char:location pairs (max 10) separated by
145 ;:
146
147 export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
148
149 NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.
150
151 NNN_OPENER: specify a custom file opener.
152
153 export NNN_OPENER=mimeopen
154
155 NNN_CONTEXT_COLORS: string of color codes for each context, e.g.:
156
157 export NNN_CONTEXT_COLORS='1234'
158
159 codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white
160
161 NNN_IDLE_TIMEOUT: set idle timeout (in seconds) to invoke terminal locker
162 (default: disabled).
163
164 NNN_COPIER: system clipboard copier script.
165
166 NOTE: File paths are copied to the tmp file ~/.config/nnn/.selection.
167 The path is shown in the help and configuration screen.
168
169 NNN_NOTE: absolute path to a note file.
170
171 export NNN_NOTE='/home/user/.mynotes'
172
173 NNN_TMPFILE: when cd on quit is pressed, the absolute path of the current
174 open directory is written to this file. A wrapper script can read this
175 file and cd into it once the program quits.
176
177 export NNN_TMPFILE=/tmp/nnn
178
179 NNN_USE_EDITOR: use EDITOR (VISUAL takes preference, preferably CLI,
180 fallback vi) to handle text files.
181
182 export NNN_USE_EDITOR=1
183
184 NNN_NO_AUTOSELECT: disable directory auto-selection in navigate-as-you-
185 type mode.
186
187 export NNN_NO_AUTOSELECT=1
188
189 NNN_RESTRICT_NAV_OPEN: disable file open on Right or l keys (Enter opens
190 files).
191
192 export NNN_RESTRICT_NAV_OPEN=1
193
194 NNN_RESTRICT_0B: restrict opening 0-byte files due to unexpected behav‐
195 iour; use edit or open with to open the file.
196
197 export NNN_RESTRICT_0B=1
198
199 NNN_TRASH: trash (instead of delete) files to desktop Trash.
200
201 export NNN_TRASH=1
202
203 NNN_OPS_PROG: show progress of copy, move operations (Linux-only, needs
204 advcpmv).
205
206 export NNN_OPS_PROG=1
207
209 If you are using urxvt you might have to set backspace key to DEC.
210
212 Lazaros Koromilas <lostd@2f30.org>,
213 Dimitris Papastamos <sin@2f30.org>,
214 Arun Prakash Jana <engineerarun@gmail.com>.
215
217 https://github.com/jarun/nnn
218
219BSD May 27, 2019 BSD