Update docs

This commit is contained in:
Arun Prakash Jana 2019-04-22 00:07:48 +05:30
parent a900b2c4fa
commit 20280e182a
No known key found for this signature in database
GPG key ID: A75979F35C080412
3 changed files with 12 additions and 13 deletions

View file

@ -305,9 +305,9 @@ colors: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan,
#### Selection
Use <kbd>^K</kbd> to copy the absolute path of the file under the cursor.
Use <kbd>^K</kbd> to select the file under the cursor.
To copy multiple absolute file paths:
To select multiple files:
- press <kbd>^Y</kbd> to enter selection mode. In this mode it's possible to
- cherry-pick individual files one by one by pressing <kbd>^K</kbd> on each entry (works across directories and contexts); or,
@ -316,13 +316,11 @@ To copy multiple absolute file paths:
_NOTE:_ If you are on BSD/macOS, please check the [BSD terminal issue](https://github.com/jarun/nnn#bsd-terminal-issue) with <kbd>^Y</kbd> for workaround.
Selected files are visually indicated by a `+`.
Selected files are visually indicated by a `+` before the entries.
The selection can now be listed, copied, moved, removed, archived or linked.
File paths are copied to the temporary file `~/.config/nnn/.selection`.
The path is shown in the help and configuration screen.
Absolute paths of the selected files are copied to the temporary file `~/.config/nnn/.selection`. The path is shown in the help and configuration screen. If `$NNN_COPIER` is set the file paths are also copied to the system clipboard.
#### Filters
@ -419,7 +417,7 @@ To lookup keyboard shortcuts at runtime, press <kbd>?</kbd>.
#### PLUGINS
`nnn` can invoke plugins in the current directory (`$PWD` for the plugin) with the currently selected file name as the argument.
To extend the capabilities of `nnn`, plugins are introduced. Plugins are scripts which `nnn` can communicate with and trigger. This mechanism fits perfectly with the fundamental design to keep the core file manager lean and fast, by delegating repetitive (but not necessarily file manager-specific) tasks to the plugins.
Copy the [plugins](https://github.com/jarun/nnn/tree/master/plugins) of your interest to `~/.config/nnn/plugins`.
@ -437,7 +435,7 @@ If you have an interesting plugin feel free to raise a PR.
TLDR: Use the keybind <kbd>K</kbd> to toggle selection if you are having issues with <kbd>^Y</kbd>.
By default in OpenBSD & FreeBSD (and probably on macOS as well), `stty` maps <kbd>^Y</kbd> to `DSUSP`. This means that typing <kbd>^Y</kbd> will suspend `nnn` as if you typed <kbd>^Z</kbd> (you can bring `nnn` back to the foreground by issuing `fg`) instead of entering multi-copy mode. You can check this with `stty -a`. If it includes the text `dsusp = ^Y`, issuing `stty dsusp undef` will disable this `DSUSP` and let `nnn` receive the <kbd>^Y</kbd> instead.
By default in OpenBSD & FreeBSD (and probably on macOS as well), `stty` maps <kbd>^Y</kbd> to `DSUSP`. This means that typing <kbd>^Y</kbd> will suspend `nnn` as if you typed <kbd>^Z</kbd> (you can bring `nnn` back to the foreground by issuing `fg`) instead of entering multi-selection mode. You can check this with `stty -a`. If it includes the text `dsusp = ^Y`, issuing `stty dsusp undef` will disable this `DSUSP` and let `nnn` receive the <kbd>^Y</kbd> instead.
##### Restrict file open

9
nnn.1
View file

@ -120,9 +120,8 @@ allowing continuous navigation. Works best with the \fBarrow keys\fR.
When there's a unique match and it's a directory, `nnn` auto selects the directory and enters it in this mode.
.br
The \fIwild load\fR option can be extremely handy for users who use the \fInavigate-as-you-type\fR mode constantly. The entries are unsorted when the directory loads. Applying filters sorts the entries (with directories on top). Directory color is disabled in this mode.
.Sh SELECTION 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).
.Sh SELECTION
Use \fI^K\fR to select the file under the cursor.
.Pp
To select multiple files the selection mode should be enabled using \fI^Y\fR.
In this mode it's possible to
@ -133,9 +132,11 @@ In this mode it's possible to
.Pp
Press \fI^Y\fR again to save the selection and exit selection mode.
.Pp
Selected files are visually indicated by a \fB+\fR.
Selected files are visually indicated by a \fB+\fR before the entries.
.br
The files in the list can now be listed, copied, moved, removed, archived or linked.
.br
Absolute paths of the selected files are copied to the temporary file \fB~/.config/nnn/.selection\fR. The path is shown in the help and configuration screen. If \fB$NNN_COPIER\fR is set (see ENVIRONMENT section below) the file paths are also copied to the system clipboard.
.Sh ENVIRONMENT
The SHELL, EDITOR (VISUAL, if defined) and PAGER environment variables take precedence
when dealing with the !, e and p commands respectively. A single combination to arguments is supported for SHELL and PAGER.

View file

@ -23,7 +23,7 @@
Plugins can access:
- all files in the directory (`nnn` switches to the dir where the plugin is to be run so the dir is `$PWD` for the plugin)
- the currently highlighted file (the file name is passed as the argument to a plugin)
- the current file under the cursor (the file name is passed as the argument to a plugin)
- the current selection (by reading the file `~/.config/nnn/.selection`, see the plugin `ndiff`)
Each script has a _Description_ section which provides more details on what the script does, if applicable.