diff --git a/README.md b/README.md index 1aa4e8eb..3d47487c 100644 --- a/README.md +++ b/README.md @@ -305,9 +305,9 @@ colors: 0-black, 1-red, 2-green, 3-yellow, 4-blue (default), 5-magenta, 6-cyan, #### Selection -Use ^K to copy the absolute path of the file under the cursor. +Use ^K to select the file under the cursor. -To copy multiple absolute file paths: +To select multiple files: - press ^Y to enter selection mode. In this mode it's possible to - cherry-pick individual files one by one by pressing ^K 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 ^Y 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 ?. #### 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 K to toggle selection if you are having issues with ^Y. -By default in OpenBSD & FreeBSD (and probably on macOS as well), `stty` maps ^Y to `DSUSP`. This means that typing ^Y will suspend `nnn` as if you typed ^Z (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 ^Y instead. +By default in OpenBSD & FreeBSD (and probably on macOS as well), `stty` maps ^Y to `DSUSP`. This means that typing ^Y will suspend `nnn` as if you typed ^Z (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 ^Y instead. ##### Restrict file open diff --git a/nnn.1 b/nnn.1 index cc283063..43a8fa45 100644 --- a/nnn.1 +++ b/nnn.1 @@ -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. diff --git a/plugins/README.md b/plugins/README.md index 14541033..76931bd0 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -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.