nnn.1 | 2 +- plugins/README.md | 11 ++++++----- diff --git a/nnn.1 b/nnn.1 index 049e722e24f3d037886a295d1f151b04f2a6bd9a..c043496e97e746fa064d249704f8d09894f3b911 100644 --- a/nnn.1 +++ b/nnn.1 @@ -407,7 +407,7 @@ export NNN_PLUG='p:-plugin' .Ed .Pp To assign keys to arbitrary non-background cli commands and invoke like - plugins, add \fI!\fR before the command. + plugins, add \fB!\fR before the command. .Bd -literal export NNN_PLUG='x:!chmod +x $nnn;g:!git log;s:!smplayer $nnn' diff --git a/plugins/README.md b/plugins/README.md index e57890e167dfc6a01d48d92dfffbbfff89722d3c..bb27d059d9a6629d705342810ee18d756303d298 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -131,7 +131,7 @@ - `'b:boom;b:bulknew` will result in only the first definition of *b* (`b:boom`) being used. - A keybinding definition of more than 1 character will prevent nnn from starting. -#### Skip directory refresh after running a plugin +#### Skip directory refresh after running a plugin [`-`] `nnn` refreshes the directory after running a plugin to reflect any changes by the plugin. To disable this add a `-` before the plugin name: @@ -139,7 +139,7 @@ ```sh export NNN_PLUG='p:-plugin' ``` -## Running commands as plugin +## Running commands as plugin [`!`] To assign keys to arbitrary non-background cli commands and invoke like plugins, add `!` (underscore) before the command. @@ -149,7 +149,7 @@ ``` Now ;x can be used to make a file executable, ;g can be used to the git log of a git project directory, ;s can be used to preview a partially downloaded media file. -#### Skip user confirmation after command execution +#### Skip user confirmation after command execution [`*`] `nnn` waits for user confirmation (the prompt `Press Enter to continue`) after it executes a command as plugin (unlike plugins which can add a `read` to wait). To skip this, add a `*` after the command. @@ -161,7 +161,7 @@ Now there will be no prompt after ;s and ;n. Note: Do not use `*` with programs those run and exit e.g. cat. -#### Run a GUI app as plugin +#### Run a GUI app as plugin [`&`] To run a GUI app as plugin, add a `&` after `!`. @@ -171,7 +171,7 @@ ``` Note: `$nnn` must be the last argument in this case. -#### Page non-interactive command output +#### Page non-interactive command output [`|`] To show the output of run-and-exit commands which do not need user input, add `|` (pipe) after `!`. @@ -232,6 +232,7 @@ The optional `-` at the **beginning of the stream** instructs `nnn` to clear the selection. In cases where the data transfer to `nnn` has to happen while the selection file is being read (e.g. in a loop), the plugin should create a tmp copy of the selection file, inform `nnn` to clear the selection and then do the subsequent processing with the tmp file. +A paged [`|`] or GUI [`&`] cmd run as plugin cannot clear selection. The `ctxcode` indicates the context to change the active directory of.