diff options
author | Arun Prakash Jana <engineerarun@gmail.com> | 2019-12-17 20:55:17 +0530 |
---|---|---|
committer | Arun Prakash Jana <engineerarun@gmail.com> | 2019-12-17 20:57:29 +0530 |
commit | fb2c548e86ca92b53dc01bf232ecb2b9c6896785 (patch) | |
tree | ebf6891aa96da1a1d01274461c7a9cee34d5b9f9 /plugins/README.md | |
parent | 7b064801471bcafd3d144e11dcafc5ced69905a7 (diff) | |
download | nnn-fb2c548e86ca92b53dc01bf232ecb2b9c6896785.tar.gz |
User control to disable prompt after run cmd as plugin
Diffstat (limited to 'plugins/README.md')
-rw-r--r-- | plugins/README.md | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/README.md b/plugins/README.md index a9e928a..763aa43 100644 --- a/plugins/README.md +++ b/plugins/README.md @@ -79,12 +79,20 @@ Now plugin `fzopen` can be run with the keybind <kbd>;o</kbd>, `mocplay` can be ## Running commands as plugin -To assign keys to arbitrary non-background cli commands (non-shell-interpreted) and invoke like plugins, add `_` (underscore) before the command. For example: +To assign keys to arbitrary non-background cli commands (non-shell-interpreted) and invoke like plugins, add `_` (underscore) before the command. + +For example: export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn;o:fzopen' Now <kbd>;x</kbd> can be used to make a file executable, <kbd>;g</kbd> can be used to the git log of a git project directory, <kbd>;s</kbd> can be used to preview a partially downloaded media file. +`nnn` waits for user confirmation when it executes a command as plugin (unline plugins which can add a `read` to wait). If you do not need to wait for user confirmation after the command has executed, add a `*` after the command. For example: + + export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn*;o:fzopen' + +Now there will be no prompt after <kbd>;s</kbd>. + Notes: 1. Use single quotes for `$NNN_PLUG` so `$nnn` is not interpreted |