nnn/nnn.1
2018-02-24 19:46:58 +05:30

270 lines
6.8 KiB
Groff

.Dd Dec 25, 2017
.Dt NNN 1
.Os
.Sh NAME
.Nm nnn
.Nd the missing terminal file browser for X
.Sh SYNOPSIS
.Nm
.Op Ar -b key
.Op Ar -c N
.Op Ar -e
.Op Ar -i
.Op Ar -l
.Op Ar -p nlay
.Op Ar -S
.Op Ar -v
.Op Ar -h
.Op Ar PATH
.Sh DESCRIPTION
.Nm
(Noice is Not Noice) is a performance-optimized, feature-packed fork of the noice terminal file browser with seamless desktop integration, simplified navigation, \fInavigate-as-you-type\fR 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.
.Pp
.Nm
opens the current working directory by default if
.Ar PATH
is not specified.
.Pp
.Nm
supports both vi-like and emacs-like key bindings in the default
configuration. The default key bindings are listed below.
.Pp
.Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
.It Ic [Up], k, ^P
Move to previous entry
.It Ic [Down], j, ^N
Move to next entry
.It Ic [PgUp], ^U
Scroll up half a page
.It Ic [PgDn], ^D
Scroll down half a page
.It Ic [Home], g, ^, ^A
Move to the first entry
.It Ic [End], G, $, ^E
Move to the last entry
.It Ic [Right], [Enter], l, ^M
Open file or enter directory
.It Ic [Left], [Backspace], h, ^H
Back up one directory level
.It Ic ^O
Open with a custom application
.It Ic [Insert]
Toggle navigate-as-you-type mode
.It Ic ~
Change to the HOME directory
.It Ic &
Change to initial directory
.It Ic -
Change to the last visited directory
.It Ic /
Change filter (more information below)
.It Ic ^/
Search directory in desktop search tool
.It Ic \&.
Toggle hide .dot files
.It Ic ^B
Show bookmark key prompt
.It Ic b
Pin current directory
.It Ic ^V
Visit pinned directory
.It Ic c
Show change directory prompt
.It Ic d
Toggle detail view
.It Ic D
Show current file details screen
.It Ic m
Show brief media info
.It Ic M
Show full media info
.It Ic n
Create a new file or directory
.It Ic ^R
Rename selected entry
.It Ic R
Rename directory entries
.It Ic s
Toggle sort by file size
.It Ic S, ^J
Toggle disk usage analyzer mode
.It Ic t
Toggle sort by time modified
.It Ic \&!
Spawn SHELL in PWD (fallback sh)
.It Ic e
Open current entry in EDITOR (fallback vi)
.It Ic o
Open directory in NNN_DE_FILE_MANAGER
.It Ic p
Open current entry in PAGER (fallback less)
.It Ic F
List files in archive
.It Ic ^F
Extract archive in current directory
.It Ic ^K
Invoke file path copier
.It Ic ^Y
Toggle multiple file path copy mode
.It Ic ^T
Toggle path quote
.It Ic ^L
Force a redraw, clear rename or filter prompt
.It Ic \&?
Toggle help and settings screen
.It Ic Q
Quit and change directory
.It Ic q, ^X
Quit
.El
.Pp
Backing up one directory level will set the cursor position at the
directory you came out of.
.Pp
Help & settings, file details, media info and archive listing are shown in the
PAGER. Please use the PAGER-specific keys in these screens.
.Pp
.Nm
supports the following options:
.Pp
.Fl "b key"
specify bookmark key to open
.Pp
.Fl "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
.Pp
.Fl e
use exiftool instead of mediainfo
.Pp
.Fl i
start in navigate-as-you-type mode
.Pp
.Fl l
start in light mode (fewer details)
.Pp
.Fl "p nlay"
path to custom nlay
.Pp
.Fl S
start in disk usage analyzer mode
.Pp
.Fl v
show version and exit
.Pp
.Fl h
show program help and exit
.Sh CONFIGURATION
.Nm
uses \fIxdg-open\fR (on Linux) and \fIopen(1)\fR (on OS X) as the desktop
opener. It invokes
.Pa nlay
to run desktop search utility or screensaver. Read more on
.Pa nlay
at:
.br
.Em https://github.com/jarun/nnn/wiki/all-about-nlay
.Pp
There is no configuration file. Settings work on environment variables. Please
refer to the ENVIRONMENT section below.
.Pp
Configuring
.Nm
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.
.Sh FILTERS
Filters support regexes to instantly (search-as-you-type) list the matching
entries in the current directory.
.Pp
There are 3 ways to reset a filter:
.Pp
(1) pressing \fI^L\fR (at the new/rename prompt \fI^L\fR followed by \fIEnter\fR
discards all changes and exits prompt),
.br
(2) a search with no matches or
.br
(3) an extra backspace at the filter prompt (like vi).
.Pp
Common use cases:
.Pp
(1) To list all matches starting with the filter expression, start the expression
with a '^' (caret) symbol.
.br
(2) Type '\\.mkv' to list all MKV files.
.Pp
If
.Nm
is invoked as root the default filter will also match hidden files.
.Pp
In the \fInavigate-as-you-type\fR mode directories are opened in filter mode,
allowing continuous navigation. Works best with the \fBarrow keys\fR.
.Sh MULTI-COPY MODE
The absolute path of a single file can be copied to clipboard by pressing \fI^K\fR if
NNN_COPIER is set (see ENVIRONMENT section below).
.Pp
To copy multiple file paths the multi-copy mode should be enabled using \fI^Y\fR.
In this mode it's possible to
.Pp
(1) select multiple files one by one by pressing \fI^K\fR on each entry; or,
.br
(2) navigate to another file in the same directory to select a range of files.
.Pp
Pressing \fI^Y\fR again copies the paths to clipboard and exits the multi-copy mode.
.Sh ENVIRONMENT
The SHELL, EDITOR and PAGER environment variables take precedence
when dealing with the !, e and p commands respectively.
.Pp
\fBNNN_BMS:\fR bookmark string as \fIkey:location\fR pairs (max 10) separated by
\fI;\fR:
.Bd -literal
export NNN_BMS='doc:~/Documents;u:/home/user/Cam Uploads;D:~/Downloads/'
.Ed
.Pp
\fBNNN_USE_EDITOR:\fR use EDITOR (preferably CLI, fallback vi) to handle text
files.
.Bd -literal
export NNN_USE_EDITOR=1
.Ed
.Pp
\fBNNN_DE_FILE_MANAGER:\fR set to a desktop file manager to open the current
directory with. E.g.:
.Bd -literal
export NNN_DE_FILE_MANAGER=thunar
.Ed
.Pp
\fBNNN_IDLE_TIMEOUT:\fR set idle timeout (in seconds) to invoke terminal
screensaver.
.Pp
\fBNNN_COPIER:\fR set to a clipboard copier script. For example, on Linux:
.Bd -literal
-------------------------------------
#!/bin/sh
# comment the next line to convert newlines to spaces
IFS=
echo -n $1 | xsel --clipboard --input
-------------------------------------
.Ed
.Pp
\fBNNN_NO_X:\fR X display is unavailable. Copy file path(s) to \fI/tmp/nnncp\fR.
.Bd -literal
export NNN_NO_X=1
.Ed
.Pp
\fBNNN_NOWAIT:\fR necessary only if nnn blocks while a file is open.
.Bd -literal
export NNN_NOWAIT=1
.Ed
.Pp
\fBNNN_QUOTE_ON:\fR wrap copied paths within single quotes. Useful for pasting
names in the shell.
.Sh KNOWN ISSUES
If you are using urxvt you might have to set backspacekey to DEC.
.Sh AUTHORS
.An Lazaros Koromilas Aq Mt lostd@2f30.org ,
.An Dimitris Papastamos Aq Mt sin@2f30.org ,
.An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
.Sh HOME
.Em https://github.com/jarun/nnn