nnn/nnn.1

148 lines
4.3 KiB
Groff
Raw Normal View History

2016-08-21 07:19:42 +00:00
.Dd August 21, 2016
.Dt NNN 1
2014-10-22 11:52:45 +00:00
.Os
.Sh NAME
.Nm nnn
2017-03-31 02:52:51 +00:00
.Nd free, fast, friendly file browser
2014-10-22 11:52:45 +00:00
.Sh SYNOPSIS
.Nm nnn
2014-10-22 11:52:45 +00:00
.Op Ar dir
.Sh DESCRIPTION
.Nm
2017-03-31 02:52:51 +00:00
(Noice is Not Noice) is a fork of the noice terminal file browser with improved desktop integration, file associations and navigation. It remains a simple and efficient file browser that stays out of your way.
2014-10-22 11:52:45 +00:00
.Pp
.Nm
defaults to the current directory if
.Ar dir
2017-03-31 02:52:51 +00:00
is not specified.
.Pp
.Nm
2014-10-22 11:52:45 +00:00
supports both vi-like and emacs-like key bindings in the default
2017-03-31 02:52:51 +00:00
configuration. The default key bindings are listed below.
2014-10-22 11:52:45 +00:00
.Pp
2014-11-14 14:41:46 +00:00
.Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
.It Ic k, [Up] or C-p
2014-10-22 11:52:45 +00:00
Move to previous entry.
2014-11-14 14:41:46 +00:00
.It Ic j, [Down] or C-n
2014-10-22 11:52:45 +00:00
Move to next entry.
2014-11-14 14:41:46 +00:00
.It Ic [Pgup] or C-u
Scroll up half a page.
.It Ic [Pgdown] or C-d
Scroll down half a page.
2015-11-26 15:03:26 +00:00
.It Ic [Home], ^ or C-a
Move to the first entry.
2015-11-26 15:03:26 +00:00
.It Ic [End], $ or C-e
Move to the last entry.
2014-11-14 14:41:46 +00:00
.It Ic l, [Right], [Return] or C-m
2014-10-22 11:52:45 +00:00
Open file or enter directory.
2015-11-26 15:03:26 +00:00
.It Ic h, C-h, [Left] or [Backspace]
2014-10-22 11:52:45 +00:00
Back up one directory level.
2017-03-31 02:52:51 +00:00
.It Ic ~
Change to the HOME directory.
2014-11-14 14:41:46 +00:00
.It Ic / or &
Change filter (see below for more information).
2014-10-22 11:52:45 +00:00
.It Ic c
Change into the given directory.
2017-03-31 02:52:51 +00:00
.It Ic d
Toggle detail view.
.It Ic \&.
Toggle hide .dot files.
2017-03-31 02:52:51 +00:00
.It Ic s
Toggle sort by file size.
.It Ic t
2015-02-05 15:53:50 +00:00
Toggle sort by time modified.
.It Ic \&!
2016-02-19 13:56:42 +00:00
Spawn a shell in current directory.
.It Ic z
Run the system top utility.
.It Ic e
Open selected entry with the vi editor.
2015-11-26 15:03:26 +00:00
.It Ic p
Open selected entry with the less pager.
2017-03-31 02:52:51 +00:00
.It Ic C-k
Invoke file name copier.
.It Ic C-l
Force a redraw.
2014-10-22 11:52:45 +00:00
.It Ic q
2014-11-14 14:41:46 +00:00
Quit.
2014-10-22 11:57:22 +00:00
.El
.Pp
Backing up one directory level will set the cursor position at the
directory you came out of.
2014-10-22 11:52:45 +00:00
.Sh CONFIGURATION
.Nm
is configured by modifying
.Pa config.h
and recompiling the code.
.Pp
2017-03-31 02:52:51 +00:00
Environment variable
.Ar NNN_OPENER
overrides all hard-coded file associations.
.Pp
Hard-coded associations are specified by regexes matching on the currently selected filename. If a match is found the associated program is executed with the filename passed in as the argument. If no match is found the environment variable
.Ar NNN_FALLBACK_OPENER
is invoked, if set.
.Pp
No particular utility is set as the default opener as no standalone universal opener for all mime types exists.
2014-10-22 11:52:45 +00:00
.Pp
See the examples section below for more information.
.Sh FILTERS
2017-03-31 02:52:51 +00:00
Filters support regexes to display only the matched
2014-10-22 11:52:45 +00:00
entries in the current directory view. This effectively allows
searching through the directory tree for a particular entry.
.Pp
Filters do not stack on top of each other. They are applied anew
every time.
.Pp
2015-01-27 10:24:09 +00:00
To reset the filter you can input an empty filter expression.
.Pp
If
.Nm
is invoked as root the default filter will also match hidden
files.
2015-11-26 15:03:26 +00:00
.Sh ENVIRONMENT
The SHELL, EDITOR and PAGER environment variables take precedence
when dealing with the !, e and p commands respectively.
2016-08-21 08:28:53 +00:00
.Pp
\fBNNN_OPENER:\fR set to your desktop environment's default
2016-08-21 08:28:53 +00:00
mime opener to override all custom mime associations.
.br
Examples: xdg-open, gnome-open, gvfs-open.
2016-08-21 10:32:03 +00:00
.Pp
\fBNNN_FALLBACK_OPENER:\fR set to your desktop environment's default
2016-08-21 10:32:03 +00:00
mime opener to use as a fallback when no association is set for a file
type. Custom associations are listed in the EXAMPLES section below.
.Pp
\fBNNN_COPIER:\fR set to a clipboard copier script. For example, on Linux:
.Bd -literal
2017-03-31 02:52:51 +00:00
-------------------------------------
#!/bin/sh
echo -n $1 | xsel --clipboard --input
2017-03-31 02:52:51 +00:00
-------------------------------------
2014-10-22 11:52:45 +00:00
.Sh EXAMPLES
The following example shows one possible configuration for
2016-08-21 08:28:53 +00:00
file associations which is also the default if environment
variable NNN_OPENER is not set:
2014-10-22 11:52:45 +00:00
.Bd -literal
2017-03-31 02:52:51 +00:00
-----------------------------------------------
struct assoc assocs[] = {
{ "\\.(c|cpp|h|txt|log)$", "vim" },
2017-03-31 02:52:51 +00:00
{ "\\.(wma|mp3|ogg|flac)$", "fmedia" },
{ "\\.pdf$", "zathura" },
{ "\\.sh$", "sh" },
};
2017-03-31 02:52:51 +00:00
-----------------------------------------------
2016-08-21 07:19:42 +00:00
Plain text files are opened with vim.
.br
Any other file types are opened with the 'xdg-open' command.
2014-10-22 11:52:45 +00:00
.Ed
2014-10-22 13:59:15 +00:00
.Sh KNOWN ISSUES
2015-01-31 22:58:08 +00:00
If you are using urxvt you might have to set backspacekey to DEC.
2014-10-22 11:52:45 +00:00
.Sh AUTHORS
.An Lazaros Koromilas Aq Mt lostd@2f30.org ,
2017-03-31 02:52:51 +00:00
.An Dimitris Papastamos Aq Mt sin@2f30.org ,
.An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
.Sh HOME
https://github.com/jarun/nnn