- Copy (as), move (as), delete, archive, link selection
- Create (with parents), rename, duplicate (anywhere) files and dirs
- Spawn a shell, run apps, run commands, execute file
+ - Hovered file set as `$nnn` at prompt and spawned shell
- Lock terminal (needs a locker)
- Minimal deps, minimal config
- Widely available
| Example `export` | Description |
| --- | --- |
| `NNN_BMS='d:~/Documents;D:~/Docs archive/'` | key-bookmark pairs [max 10] |
-| `NNN_PLUG='m:nmount;t:imgthumb;x:_chmod +x $NNN'` | key-plugin (or cmd) pairs (<kbd>:key</kbd> to run) [max 15] |
+| `NNN_PLUG='m:nmount;t:imgthumb;x:_chmod +x $nnn'` | key-plugin (or cmd) pairs (<kbd>:key</kbd> to run) [max 15] |
| `NNN_USE_EDITOR=1` | open text files in `$VISUAL` (else `$EDITOR`, fallback vi) |
| `NNN_CONTEXT_COLORS='1234'` | specify per context color [default: '4444' (all blue)] |
| `NNN_SSHFS_OPTS='sshfs -o reconnect,idmap=user'` | specify SSHFS options |
To assign keys to arbitrary non-background non-shell-interpreted cli
commands and invoke like plugins, add \fI_\fR (underscore) before the command.
.Bd -literal
- export NNN_PLUG='x:_chmod +x $NNN;g:_git log;s:_smplayer $NNN;o:fzopen'
+ export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn;o:fzopen'
NOTES:
- 1. Use single quotes for $NNN_PLUG so $NNN is not interpreted
- 2. $NNN should be the last argument (IF you want to pass the hovered file name)
+ 1. Use single quotes for $NNN_PLUG so $nnn is not interpreted
+ 2. $nnn should be the last argument (IF you want to pass the hovered file name)
3. (Again) add \fI_\fR before the command
.Ed
.Pp
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'
+ 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.
Notes:
-1. Use single quotes for `$NNN_PLUG` so `$NNN` is not interpreted
-2. `$NNN` should be the last argument (IF you want to pass the hovered file name)
+1. Use single quotes for `$NNN_PLUG` so `$nnn` is not interpreted
+2. `$nnn` should be the last argument (IF you want to pass the hovered file name)
3. (_Again_) add `_` before the command
## Access level of plugins
"VISUAL",
"EDITOR",
"PAGER",
- "NNN",
+ "nnn",
};
#ifdef __linux__
if (tmp[0] == '_' && tmp[1]) {
xstrlcpy(newpath, ++tmp, PATH_MAX);
- if (is_suffix(newpath, " $NNN")) {
+ if (is_suffix(newpath, " $nnn")) {
tmp = (ndents ? dents[cur].name : NULL);
- /* Set `\0` to clear ' $NNN' suffix */
+ /* Set `\0` to clear ' $nnn' suffix */
newpath[strlen(newpath) - 5] = '\0';
} else
tmp = NULL;