1
1
mirror of https://github.com/jarun/nnn.git synced 2024-11-13 07:26:33 +03:00
nnn/nnn.1

158 lines
4.3 KiB
Groff
Raw Normal View History

2016-08-21 10:19:42 +03:00
.Dd August 21, 2016
.Dt NNN 1
2014-10-22 15:52:45 +04:00
.Os
.Sh NAME
.Nm nnn
2017-03-31 05:52:51 +03:00
.Nd free, fast, friendly file browser
2014-10-22 15:52:45 +04:00
.Sh SYNOPSIS
.Nm nnn
2017-04-01 08:18:18 +03:00
.Op Ar -d
2014-10-22 15:52:45 +04:00
.Op Ar dir
.Sh DESCRIPTION
.Nm
2017-03-31 05:52:51 +03: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 15:52:45 +04:00
.Pp
.Nm
defaults to the current directory if
.Ar dir
2017-03-31 05:52:51 +03:00
is not specified.
.Pp
.Nm
2014-10-22 15:52:45 +04:00
supports both vi-like and emacs-like key bindings in the default
2017-03-31 05:52:51 +03:00
configuration. The default key bindings are listed below.
2014-10-22 15:52:45 +04:00
.Pp
2014-11-14 17:41:46 +03:00
.Bl -tag -width "l, [Right], [Return] or C-mXXXX" -offset indent -compact
2017-04-03 20:03:46 +03:00
.It Ic [Up], k, ^P
2017-03-31 21:05:48 +03:00
Move to previous entry
2017-04-03 20:03:46 +03:00
.It Ic [Down], j, ^N
2017-03-31 21:05:48 +03:00
Move to next entry
2017-04-03 20:03:46 +03:00
.It Ic [PgUp], ^U
2017-03-31 21:05:48 +03:00
Scroll up half a page
2017-04-03 20:03:46 +03:00
.It Ic [PgDn], ^D
2017-03-31 21:05:48 +03:00
Scroll down half a page
.It Ic [Home], g, ^, ^A
2017-03-31 21:05:48 +03:00
Move to the first entry
.It Ic [End], G, $, ^E
2017-03-31 21:05:48 +03:00
Move to the last entry
2017-04-03 20:03:46 +03:00
.It Ic [Right], [Enter], l, ^M
2017-03-31 21:05:48 +03:00
Open file or enter directory
2017-04-03 20:03:46 +03:00
.It Ic [Left], [Backspace], h, ^H
2017-03-31 21:05:48 +03:00
Back up one directory level
2017-03-31 05:52:51 +03:00
.It Ic ~
2017-03-31 21:05:48 +03:00
Change to the HOME directory
2017-04-03 20:03:46 +03:00
.It Ic /, &
2017-03-31 21:05:48 +03:00
Change filter (more information below)
2014-10-22 15:52:45 +04:00
.It Ic c
2017-03-31 21:05:48 +03:00
Change into the given directory
2017-03-31 05:52:51 +03:00
.It Ic d
2017-03-31 21:05:48 +03:00
Toggle detail view
.It Ic D
Show details of selected file
.It Ic \&.
2017-03-31 21:05:48 +03:00
Toggle hide .dot files
2017-03-31 05:52:51 +03:00
.It Ic s
2017-03-31 21:05:48 +03:00
Toggle sort by file size
.It Ic t
2017-03-31 21:05:48 +03:00
Toggle sort by time modified
.It Ic \&!
2017-03-31 21:05:48 +03:00
Spawn SHELL in PWD (fallback sh)
.It Ic z
Run the system top utility.
.It Ic e
2017-03-31 21:05:48 +03:00
Open current entry in EDITOR (fallback vi)
2015-11-26 18:03:26 +03:00
.It Ic p
2017-03-31 21:05:48 +03:00
Open current entry in PAGER (fallback less)
2017-04-03 20:03:46 +03:00
.It Ic ^K
2017-03-31 21:05:48 +03:00
Invoke file name copier
2017-04-03 20:03:46 +03:00
.It Ic ^L
2017-03-31 21:05:48 +03:00
Force a redraw
2017-04-03 20:03:46 +03:00
.It Ic \&?
Show help
2014-10-22 15:52:45 +04:00
.It Ic q
2017-03-31 21:05:48 +03:00
Quit
2014-10-22 15:57:22 +04:00
.El
.Pp
Backing up one directory level will set the cursor position at the
directory you came out of.
2017-04-01 08:18:18 +03:00
.Pp
.Nm
supports the following option:
.Pp
.Fl d
Open in detail view mode.
2014-10-22 15:52:45 +04:00
.Sh CONFIGURATION
.Nm
is configured by modifying
.Pa config.h
and recompiling the code.
.Pp
2017-03-31 05:52:51 +03: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 15:52:45 +04:00
.Pp
See the examples section below for more information.
.Sh FILTERS
2017-03-31 05:52:51 +03:00
Filters support regexes to display only the matched
2014-10-22 15:52:45 +04: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
2017-04-04 17:27:44 +03:00
An empty filter expression resets the filter.
.Pp
If
.Nm
is invoked as root the default filter will also match hidden
files.
2015-11-26 18:03:26 +03:00
.Sh ENVIRONMENT
The SHELL, EDITOR and PAGER environment variables take precedence
when dealing with the !, e and p commands respectively.
2016-08-21 11:28:53 +03:00
.Pp
\fBNNN_OPENER:\fR set to your desktop environment's default
2016-08-21 11:28:53 +03:00
mime opener to override all custom mime associations.
.br
Examples: xdg-open, gnome-open, gvfs-open.
2016-08-21 13:32:03 +03:00
.Pp
\fBNNN_FALLBACK_OPENER:\fR set to your desktop environment's default
2016-08-21 13:32:03 +03: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 05:52:51 +03:00
-------------------------------------
#!/bin/sh
echo -n $1 | xsel --clipboard --input
2017-03-31 05:52:51 +03:00
-------------------------------------
2014-10-22 15:52:45 +04:00
.Sh EXAMPLES
The following example shows one possible configuration for
2016-08-21 11:28:53 +03:00
file associations which is also the default if environment
variable NNN_OPENER is not set:
2014-10-22 15:52:45 +04:00
.Bd -literal
2017-03-31 05:52:51 +03:00
-----------------------------------------------
struct assoc assocs[] = {
2017-03-31 21:05:48 +03:00
{ "\\.(c|cpp|h|txt|log|sh)$", "vi" },
2017-04-01 01:23:49 +03:00
{ "\\.(wma|mp3|ogg|flac)$", "mpv" },
{ "\\.pdf$", "zathura" },
};
2017-03-31 05:52:51 +03:00
-----------------------------------------------
2017-03-31 19:55:56 +03:00
Plain text files are opened with vi.
2016-08-21 10:19:42 +03:00
.br
Any other file types are opened with the 'xdg-open' command.
2014-10-22 15:52:45 +04:00
.Ed
2014-10-22 17:59:15 +04:00
.Sh KNOWN ISSUES
2015-02-01 01:58:08 +03:00
If you are using urxvt you might have to set backspacekey to DEC.
2014-10-22 15:52:45 +04:00
.Sh AUTHORS
.An Lazaros Koromilas Aq Mt lostd@2f30.org ,
2017-03-31 05:52:51 +03:00
.An Dimitris Papastamos Aq Mt sin@2f30.org ,
.An Arun Prakash Jana Aq Mt engineerarun@gmail.com .
.Sh HOME
2017-04-01 08:18:18 +03:00
.Em https://github.com/jarun/nnn