diff --git a/README.md b/README.md
index 4bd55620..50489515 100644
--- a/README.md
+++ b/README.md
@@ -58,6 +58,7 @@ Add to that an awesome [Wiki](https://github.com/jarun/nnn/wiki)!
- 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
@@ -147,7 +148,7 @@ There is no config file. Associated files are stored under `${XDG_CONFIG_HOME:-$
| 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 (:key to run) [max 15] |
+| `NNN_PLUG='m:nmount;t:imgthumb;x:_chmod +x $nnn'` | key-plugin (or cmd) pairs (:key 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 |
diff --git a/nnn.1 b/nnn.1
index 0f94c96f..089fc565 100644
--- a/nnn.1
+++ b/nnn.1
@@ -192,11 +192,11 @@ when dealing with the !, e and p commands respectively. A single combination to
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
diff --git a/plugins/README.md b/plugins/README.md
index 11b7578f..d29f358f 100644
--- a/plugins/README.md
+++ b/plugins/README.md
@@ -79,14 +79,14 @@ Now plugin `fzopen` can be run with the keybind :o, `mocplay` can be
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 :x can be used to make a file executable, :g can be used to the git log of a git project directory, :s 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
diff --git a/src/nnn.c b/src/nnn.c
index 089bbeb1..0b35ae76 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -516,7 +516,7 @@ static const char * const envs[] = {
"VISUAL",
"EDITOR",
"PAGER",
- "NNN",
+ "nnn",
};
#ifdef __linux__
@@ -5086,9 +5086,9 @@ nochange:
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;