- [Installation](#installation)
- [Quickstart](#quickstart)
- [Usage](#usage)
-- [Keyboard shortcuts](#keyboard-shortcuts)
-- [Filters](#filters)
-- [File type abbreviations](#file-type-abbreviations)
-- [Help](#help)
+ - [Cmdline options](#cmdline-options)
+ - [Keyboard shortcuts](#keyboard-shortcuts)
+ - [Filters](#filters)
+ - [File type abbreviations](#file-type-abbreviations)
+ - [Help](#help)
- [Copy current file path to clipboard](#copy-current-file-path-to-clipboard)
- [Change file associations](#change-file-associations)
### Usage
-Start nnn (default dir: current directory):
+#### Cmdline options
- $ nnn [-d] [-S] [-v] [dir]
+ usage: nnn [-d] [-S] [-v] [h] [PATH]
+
+ The missing terminal file browser for X.
+
+ positional arguments:
+ PATH directory to open [default: current dir]
+
+ optional arguments:
+ -d start in detail view mode
+ -S start in disk usage analyzer mode
+ -v show program version and exit
+ -h show this help and exit
- -d: start in detail view mode
- -S: start in disk usage analyzer mode
- -v: show version and exit
`>` indicates the currently selected entry in nnn.
-### Keyboard shortcuts
+#### Keyboard shortcuts
| Key | Function |
| --- | --- |
| `?` | Toggle help screen |
| `q` | Quit |
-### Filters
+#### Filters
Filters support regexes to display only the matched entries in the current directory view. This effectively allows searching through the directory tree for a particular entry.
If nnn is invoked as root the default filter will also match hidden files.
-### File type abbreviations
+#### File type abbreviations
The following abbreviations are used in the detail view:
| `b` | Block Device |
| `c` | Character Device |
-### Help
+#### Help
$ man nnn
To lookup keyboard shortcuts at runtime, press `?`.
.Os
.Sh NAME
.Nm nnn
-.Nd free, fast, friendly file browser
+.Nd the missing terminal file browser for X
.Sh SYNOPSIS
.Nm nnn
.Op Ar -d
-.Op Ar dir
+.Op Ar -S
+.Op Ar -v
+.Op Ar -h
+.Op Ar PATH
.Sh DESCRIPTION
.Nm
(Noice is Not Noice) is a fork of the noice terminal file browser with improved desktop integration, navigation, 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
defaults to the current directory if
-.Ar dir
+.Ar PATH
is not specified.
.Pp
.Nm
.Pp
.Fl v
show version and exit
+.Pp
+.Fl h
+ show program help and exit
.Sh CONFIGURATION
.Nm
is configured by modifying
static void
usage(void)
{
- fprintf(stderr, "usage: nnn [-d] [-S] [-v] [dir]\n");
- exit(1);
+ fprintf(stdout, "usage: nnn [-d] [-S] [-v] [h] [PATH]\n\n\
+The missing terminal file browser for X.\n\n\
+positional arguments:\n\
+ PATH directory to open [default: current dir]\n\n\
+optional arguments:\n\
+ -d start in detail view mode\n\
+ -S start in disk usage analyzer mode\n\
+ -v show program version and exit\n\
+ -h show this help and exit\n\n\
+Version: %s\n\
+License: BSD 2-Clause\n\
+Webpage: https://github.com/jarun/nnn\n", VERSION);
+
+ exit(0);
}
int
if (argc > 3)
usage();
- while ((opt = getopt(argc, argv, "dSv")) != -1) {
+ while ((opt = getopt(argc, argv, "dSvh")) != -1) {
switch (opt) {
case 'S':
bsizeorder = 1;
printptr = &printent_long;
break;
case 'v':
- fprintf(stderr, "%s\n", VERSION);
+ fprintf(stdout, "%s\n", VERSION);
return 0;
+ case 'h':
default:
usage();
}