mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Update docs
This commit is contained in:
parent
bde0f5c354
commit
cea542b515
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue