NNN(1)

NAME
nnn - the missing terminal file manager for X

SYNOPSIS
nnn [-b key] [-C] [-e] [-i] [-l] [-p file] [-S] [-v] [-h] [PATH]

DESCRIPTION
nnn (Noice is Not Noice) is a performance-optimized, feature-packed fork of noice (http://git.2f30.org/noice/) with seamless desktop integration, simplified navigation, navigate-as-you-type 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.

nnn opens the current working directory by default if PATH is not specified.

KEYBINDS

nnn supports both vi-like and emacs-like key bindings as listed below.

NAVIGATION

[Up], k, ^P
    Move to previous entry
[Down], j, ^N
    Move to next entry
[PgUp], ^U
    Scroll up half a page
[PgDn], ^D
    Scroll down half a page
[Home], g, ^, ^A
    Move to the first entry
[End], G, $, ^E
    Move to the last entry
[Left], [Backspace], h, ^H
    Go to parent directory
[Right], [Enter], l, ^M
    Open file or enter directory
~   Change to the HOME directory
&   Change to initial directory
-   Change to the last visited directory
.   Toggle show hidden . (dot) files
/   Change filter (more information below)
[Insert], ^T
    Toggle navigate-as-you-type mode
b   Pin current directory
^W  Visit pinned directory
d   Toggle detail view
Tab, ^I
    Next context, ask to create if none
`, ^/
    Leader key
LeaderN
    Switch to context N
Esc Exit prompt
^L  Force a redraw, clear prompt
q   Quit the current context
^G  Quit and change directory
Q, ^Q
    Quit
?   Help and configuration screen

FILES

^O  Open with an application (takes 1 combined argument)
n   Create a new file or directory
D   Show entry details
^R  Rename selected entry
r   Open directory in vidir
Y, ^Y
    Toggle selection mode
Space, ^K
    Copy entry absolute path
y   Show selection list
P   Copy files from selection
V   Move files from selection
X   Delete files from selection
^X  Delete entry
f   Archive entry
F   List files in archive
^F  Extract archive in current directory
m, M
    Show brief/full media info
e   Open entry in EDITOR (fallback vi)
p   Open entry in PAGER (fallback less)

ORDER TOGGLES

^J  Toggle disk usage analyzer mode
S   Toggle sort by apparent size
t   Toggle sort by time modified
s   Toggle sort by file size

MISC

!, ^]
    Spawn SHELL in current directory (fallback sh)
C   Execute entry
R   Run or choose a custom script
L   Lock terminal
^S  Run a command

Backing up one directory level will set the cursor position at the directory you came out of.

Help & settings, file details, media info and archive listing are shown in the PAGER. Please use the PAGER-specific keys in these screens.

OPTIONS

nnn supports the following options:

-b key specify bookmark key to open

-C disable directory color

-e use exiftool instead of mediainfo

-i start in navigate-as-you-type mode

-l start in light mode (fewer details)

-p file copy (or pick) selection to file, or stdout if file='-'

-S start in disk usage analyzer mode

-v show version and exit

-h show program help and exit

CONFIGURATION
nnn uses xdg-open (on Linux) and open(1) (on macOS) as the desktop opener.

There is no configuration file. Settings work on environment variables. Please refer to the ENVIRONMENT section below.

Configuring nnn to change to the last visited directory on quit requires shell integration in a few easy steps. Please visit the project page (linked below) for the instructions.

CONTEXTS
Contexts serve the purpose of exploring multiple directories simultaneously. 4 contexts are available. The status of the contexts are shown in the top left corner:

- the current context is in reverse
- other used contexts are underlined
- rest are unused

To switch to a context press the Leader key followed by the context number (1-4).

The first time a context is entered, it copies the state of the last visited context. Each context remembers its start directory and last visited directory.

When a context is quit, the next active context is selected. If the last active context is quit, the program quits.

FILTERS
Filters support regexes to instantly (search-as-you-type) list the matching entries in the current directory.

Ways to exit filter prompt:

(1) press ^L to clear filter followed by Bksp (to clear the filter symbol, like vi)
- at other prompts ^L followed by Enter discards all changes and exits prompt
(2) run a search with no matches and press Enter

Common use cases:

(1) To list all matches starting with the filter expression, start the expression with a '^' (caret) symbol.
(2) Type '\.mkv' to list all MKV files.
(3) Use '.*' to match any character (sort of fuzzy search).

If nnn is invoked as root or the environment variable NNN_SHOW_HIDDEN is set the default filter will also match hidden files.

In the navigate-as-you-type mode directories are opened in filter mode, allowing continuous navigation. Works best with the arrow keys.
In case of only one match and it's a directory, `nnn` auto selects the directory and enters it in this mode.

SELECTION MODE
The absolute path of a single file can be copied to clipboard by pressing ^K if NNN_COPIER is set (see ENVIRONMENT section below).

To copy multiple file paths the selection mode should be enabled using ^Y. In this mode it's possible to

(1) cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
(2) navigate to another file in the same directory to select a range of files.

Pressing ^Y again copies the paths and exits the selection mode. The files in the list can now be copied, moved or removed using respective keyboard shortcuts.

To list the file paths copied to memory press y.

ENVIRONMENT
The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence when dealing with the !, e and p commands respectively. A single combination to arguments is supported, e.g.:

        export EDITOR='vim -xR'

NNN_BMS: bookmark string as key_char:location pairs (max 10) separated by ;:

        export NNN_BMS='d:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
        NOTE: Bookmark keys should be single-character to use them in combination with the Leader key.

NNN_USE_EDITOR: use EDITOR (preferably CLI, fallback vi) to handle text files.

        export NNN_USE_EDITOR=1

NNN_CONTEXT_COLORS: string of color codes for each context, e.g.:

        export NNN_CONTEXT_COLORS="1234"
        codes: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, 7-white

NNN_IDLE_TIMEOUT: set idle timeout (in seconds) to invoke terminal locker (default: disabled).

NNN_COPIER: set to a clipboard copier script.

        NOTE: By default file paths are copied to the tmp file DIR/.nnncp, where 'DIR' (by priority) is:
        $HOME or, $TMPDIR or, /tmp.
        The path is shown in the help and configuration screen.

NNN_SCRIPT: absolute path to a directory to select a script from or a single script to invoke with currently selected file name as argument 1.

        export NNN_SCRIPT=/home/user/scripts
        OR
        export NNN_SCRIPT=/usr/local/bin/nscript.sh

NNN_SHOW_HIDDEN: show hidden files.

        export NNN_SHOW_HIDDEN=1

NNN_NO_AUTOSELECT: disable directory auto-selection in navigate-as-you-type mode.

        export NNN_NO_AUTOSELECT=1

DISABLE_FILE_OPEN_ON_NAV: disable file open on Right or l keys (Enter opens files).

        export DISABLE_FILE_OPEN_ON_NAV=1

KNOWN ISSUES
If you are using urxvt you might have to set backspace key to DEC.

AUTHORS
Lazaros Koromilas <lostd@2f30.org>, Dimitris Papastamos <sin@2f30.org>, Arun Prakash Jana <engineerarun@gmail.com>.

HOME
https://github.com/jarun/nnn