NNN(1)

NAME
nnn - the missing terminal file manager for X

SYNOPSIS
nnn [-b key] [-d] [-e] [-i] [-l] [-n] [-p file] [-s] [-S] [-v] [-w] [-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

Press ? in nnn to see the list of keybinds.

OPTIONS

nnn supports the following options:

-b key specify bookmark key to open

-d show hidden files

-e use exiftool instead of mediainfo

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

-l start in light mode (fewer details)

-n use version compare to sort files

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

-s use substring match for filters instead of regex

-S start in disk usage analyzer mode

-v show version and exit

-w wild load - entries unsorted on directory load

-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. See ENVIRONMENT section below.

Configuring nnn to change to the last visited directory on quit requires shell integration in a few easy steps. Look up NNN_TMPFILE in the ENVIRONMENT section below.

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 active contexts are underlined
- rest are inactive

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 last visited directory.

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

Each context can have its own directory color specified. See ENVIRONMENT section below.

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

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).

There is a program option to filter entries by substring match instead of regex.

In the navigate-as-you-type mode directories are opened in filter mode, allowing continuous navigation. Works best with the arrow keys.
When there's a unique match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
The wild load option can be extremely handy for users who use the navigate-as-you-type mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode.

SELECTION
Use ^K to select the file under the cursor.

To select multiple files 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.

Press ^Y again to save the selection and exit selection mode.

Selected files are visually indicated by a + before the entries.
The files in the list can now be listed, copied, moved, removed, archived or linked.
Absolute paths of the selected files are copied to the temporary file ~/.config/nnn/.selection. The path is shown in the help and configuration screen. If $NNN_COPIER is set (see ENVIRONMENT section below) the file paths are also copied to the system clipboard.

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 for SHELL and PAGER.

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_OPENER: specify a custom file opener.

        export NNN_OPENER=mimeopen

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: system clipboard copier script.

        NOTE: File paths are copied to the tmp file ~/.config/nnn/.selection.
        The path is shown in the help and configuration screen.

NNN_NOTE: absolute path to a note file.

        export NNN_NOTE='/home/user/.mynotes'

NNN_TMPFILE: when cd on quit is pressed, the absolute path of the current open directory is written to this file. A wrapper script can read this file and cd into it once the program quits.

        export NNN_TMPFILE=/tmp/nnn

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

        export NNN_USE_EDITOR=1

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

        export NNN_NO_AUTOSELECT=1

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

        export NNN_RESTRICT_NAV_OPEN=1

NNN_RESTRICT_0B: restrict opening 0-byte files due to unexpected behaviour; use edit or open with to open the file.

        export NNN_RESTRICT_0B=1

NNN_TRASH: trash (instead of delete) files to desktop Trash.

        export NNN_TRASH=1

NNN_OPS_PROG: show progress of copy, move operations (Linux-only, needs advcpmv).

        export NNN_OPS_PROG=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