From a335f94d05bc1270aec3f4bffcc092dae125f14f Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 6 Aug 2022 11:23:10 +0530 Subject: [PATCH] Update docs --- nnn.1 | 2 +- plugins/README.md | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/nnn.1 b/nnn.1 index 049e722e..c043496e 100644 --- a/nnn.1 +++ b/nnn.1 @@ -407,7 +407,7 @@ separated by \fI;\fR: .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 e57890e1..bb27d059 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -131,7 +131,7 @@ Note: - 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 @@ Note: 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 @@ export NNN_PLUG='x:!chmod +x $nnn;g:!git log;s:!smplayer $nnn' 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 @@ export NNN_PLUG='m:-!&mousepad $nnn' 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 plugin should write a single string in the format `(<->)