aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md15
1 files changed, 13 insertions, 2 deletions
diff --git a/README.md b/README.md
index 5e9f3c6..d2e57f4 100644
--- a/README.md
+++ b/README.md
@@ -59,6 +59,7 @@ Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/i
- [cd on quit](#cd-on-quit)
- [copy file paths to clipboard](#copy-file-paths-to-clipboard)
- [copy file paths when X is missing](#copy-file-paths-when-x-is-missing)
+ - [run a custom script](#run-a-custom-script)
- [change dir color](#change-dir-color)
- [file copy, move, delete](#file-copy-move-delete)
- [boost chdir prompt](#boost-chdir-prompt)
@@ -97,6 +98,7 @@ Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/i
- Create, rename files and directories
- Batch rename/move/delete current directory entries in vidir (from moreutils)
- Spawn SHELL (fallback sh) in the current directory
+ - Run a custom script in the current directory
- Copy absolute file paths with/without X (*easy* shell integration)
- Change directory at exit (*easy* shell integration)
- Open any file in EDITOR (fallback vi) or PAGER (fallback less)
@@ -224,11 +226,12 @@ optional arguments:
M | Full media info
n | Create new
^R | Rename entry
- R | Rename dir entries
+ r | Open dir in vidir
s | Toggle sort by size
S, ^J | Toggle du mode
t | Toggle sort by mtime
! | Spawn SHELL in dir
+ R | Run custom script
e | Edit entry in EDITOR
o | Open dir in file manager
p | Open entry in PAGER
@@ -290,7 +293,7 @@ The following abbreviations are used in the detail view:
| vlock (Linux) | terminal locker |
| $EDITOR | edit files (fallback vi) |
| $PAGER | page through files (fallback less) |
-| $SHELL | spawn a shell in dir (fallback sh) |
+| $SHELL | spawn a shell, run script (fallback sh) |
- To edit all text files in EDITOR (preferably CLI, fallback vi):
@@ -407,6 +410,14 @@ so you can -
Note that you may want to keep quotes disabled in this case.
+#### run a custom script
+
+Export the path to the custom script:
+
+ export NNN_SCRIPT=/usr/local/bin/script.sh
+
+Press <kbd>R</kbd> to run the script in the current directory.
+
#### change dir color
The default color for directories is blue. Option `-c` accepts color codes from 0 to 7 to use a different color: