NNN(1)

NAME
nnn - the missing terminal file browser for X

SYNOPSIS
nnn [-b key] [-c N] [-e] [-i] [-l] [-p nlay] [-S] [-v] [-h] [PATH]

DESCRIPTION
nnn (Noice is Not Noice) is a performance-optimized, feature-packed fork of the noice terminal file browser with seamless desktop integration, simplified navigation, navigate-as-you-type 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.

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

nnn supports both vi-like and emacs-like key bindings in the default configuration. The default key bindings are listed below.

[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
[Right], [Enter], l, ^M
    Open file or enter directory
[Left], [Backspace], h, ^H
    Back up one directory level
^O  Open with a custom application
[Insert], ^I
    Toggle navigate-as-you-type mode
~   Change to the HOME directory
&   Change to initial directory
-   Change to the last visited directory
/   Change filter (more information below)
^/  Search directory in desktop search tool
.   Toggle show hidden . (dot) files
^B  Show bookmark key prompt
b   Pin current directory
^V  Visit pinned directory
c   Show change directory prompt
d   Toggle detail view
D   Show current file details screen
m   Show brief media info
M   Show full media info
n   Create a new file or directory
^R  Rename selected entry
r   Open directory in vidir
s   Toggle sort by file size
S, ^J
    Toggle disk usage analyzer mode
t   Toggle sort by time modified
!, ^]
    Spawn SHELL in PWD (fallback sh)
R   Run a custom script
e   Open current entry in EDITOR (fallback vi)
o   Open directory in NNN_DE_FILE_MANAGER
p   Open current entry in PAGER (fallback less)
f   Archive current entry
F   List files in archive
^F  Extract archive in current directory
^K  Invoke file path copier
^Y  Toggle multiple file path copy mode
^T  Toggle path quote
^L  Force a redraw, clear rename or filter prompt
L   Lock terminal (Linux only)
?   Toggle help and settings screen
Q, ^G
    Quit and change directory
q, ^X
    Quit

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.

nnn supports the following options:

-b key specify bookmark key to open

-c N specify dir color (default blue), disables if N>7 0-black, 1-red, 2-green, 3-yellow, 4-blue, 5-magenta, 6-cyan, 7-white

-e use exiftool instead of mediainfo

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

-l start in light mode (fewer details)

-p nlay path to custom nlay

-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 OS X) as the desktop opener. It invokes nlay to run desktop search utility or screensaver. Read more on nlay at:
https://github.com/jarun/nnn/wiki/all-about-nlay

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.

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

There are 3 ways to reset a filter:

(1) pressing ^L (at the new/rename prompt ^L followed by Enter discards all changes and exits prompt),
(2) a search with no matches or
(3) an extra backspace at the filter prompt (like vi).

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.

MULTI-COPY 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 multi-copy mode should be enabled using ^Y. In this mode it's possible to

(1) select multiple files one by one by pressing ^K on each entry; or,
(2) navigate to another file in the same directory to select a range of files.

Pressing ^Y again copies the paths to clipboard and exits the multi-copy mode.

ENVIRONMENT
The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence when dealing with the !, e and p commands respectively.

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

        export NNN_BMS='doc:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'

The bookmark prompt also understands the ~ (HOME), - (last visited directory) and & shortcuts.

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

        export NNN_USE_EDITOR=1

NNN_DE_FILE_MANAGER: set to a desktop file manager to open the current directory with. E.g.:

        export NNN_DE_FILE_MANAGER=thunar

NNN_IDLE_TIMEOUT: set idle timeout (in seconds) to invoke terminal screensaver.

NNN_COPIER: set to a clipboard copier script. For example, on Linux:

        -------------------------------------
        #!/bin/sh
        # comment the next line to convert newlines to spaces
        IFS=
        echo -n $1 | xsel --clipboard --input
        -------------------------------------

NNN_NO_X: X display is unavailable. Copy file path(s) to /tmp/nnncp$USER.

        export NNN_NO_X=1

NNN_QUOTE_ON: wrap copied paths within single quotes. Useful for pasting names in the shell.

NNN_SCRIPT: path to a custom script to run.

        export NNN_SCRIPT=/usr/local/bin/script.sh

NNN_SHOW_HIDDEN: show hidden files.

        export NNN_SHOW_HIDDEN=1

KNOWN ISSUES
If you are using urxvt you might have to set backspacekey 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