From: Arun Prakash Jana Date: Fri, 6 Sep 2019 14:33:48 +0000 (+0530) Subject: Update docs X-Git-Tag: v2.7~98 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=cea542b51550a7432349bad3642e1161f927251f;p=nnn.git Update docs --- diff --git a/plugins/README.md b/plugins/README.md index 91b9a170..3ddbcf89 100644 --- 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.