mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Treat ~ as special shortcut in filterentries
This commit is contained in:
parent
04ab3751af
commit
dd5b419742
2
nnn.1
2
nnn.1
|
@ -189,6 +189,8 @@ Special keys at empty filter prompt:
|
||||||
- run a plugin by its key: ';'
|
- run a plugin by its key: ';'
|
||||||
.br
|
.br
|
||||||
- pin current directory: ','
|
- pin current directory: ','
|
||||||
|
.br
|
||||||
|
- go HOME: '~'
|
||||||
.Pp
|
.Pp
|
||||||
Other noteworthy keys:
|
Other noteworthy keys:
|
||||||
.Pp
|
.Pp
|
||||||
|
|
|
@ -2499,9 +2499,10 @@ static int filterentries(char *path, char *lastname)
|
||||||
if (len == 1) {
|
if (len == 1) {
|
||||||
switch (*ch) {
|
switch (*ch) {
|
||||||
case '=': // fallthrough /* Launch app */
|
case '=': // fallthrough /* Launch app */
|
||||||
case ']': // fallthorugh /*Prompt key */
|
case ']': // fallthorugh /* Prompt key */
|
||||||
case ';': // fallthrough /* Run plugin key */
|
case ';': // fallthrough /* Run plugin key */
|
||||||
case ',': // fallthrough /* Pin CWD */
|
case ',': // fallthrough /* Pin CWD */
|
||||||
|
case '~': // fallthrough /* Go HOME */
|
||||||
case '?': /* Help and config key, '?' is an invalid regex */
|
case '?': /* Help and config key, '?' is an invalid regex */
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue