nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit cea542b51550a7432349bad3642e1161f927251f
parent bde0f5c3547aaeaa7f3cedd485013a46afe60796
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri,  6 Sep 2019 20:03:48 +0530

Update docs

Diffstat:
Mplugins/README.md | 18+++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/plugins/README.md b/plugins/README.md @@ -42,15 +42,6 @@ Download the `getplugs` plugin and execute it anywhere to get all the plugins in **NOTE:** `getplugs` also downloads the launcher `nlaunch` and tries to place it at `/usr/local/bin/` using `sudo`. If it fails you have to place `nlauch` manually somewhere in your `$PATH`. -## File access from plugins - -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 current file under the cursor (the file name is passed as the argument to a plugin) -- the current selection (by reading the file `.selection` in config dir, see the plugin `ndiff`) - -Each script has a _Description_ section which provides more details on what the script does, if applicable. - ## Usage There are 2 ways to run plugins: @@ -63,6 +54,15 @@ There are 2 ways to run plugins: 2. Use the _pick plugin_ shortcut to visit the plugin directory and execute a plugin. Repeating the same shortcut cancels the operation and puts you back in the original directory. +## File access from plugins + +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 current file under the cursor (the file name is passed as the argument to a plugin) +- the current selection (by reading the file `.selection` in config dir, see the plugin `ndiff`) + +Each script has a _Description_ section which provides more details on what the script does, if applicable. + ## Create your own plugins Plugins are scripts and all scripting languages should work. However, POSIX-compliant shell scripts runnable in `sh` are preferred. If that's too rudimentary for your use case, use Python, Perl or Ruby.