Treat ~ as special shortcut in filterentries

This commit is contained in:
Arun Prakash Jana 2020-02-22 21:20:20 +05:30
parent 04ab3751af
commit dd5b419742
No known key found for this signature in database
GPG Key ID: A75979F35C080412
2 changed files with 4 additions and 1 deletions

2
nnn.1
View File

@ -189,6 +189,8 @@ Special keys at empty filter prompt:
- run a plugin by its key: ';'
.br
- pin current directory: ','
.br
- go HOME: '~'
.Pp
Other noteworthy keys:
.Pp

View File

@ -2499,9 +2499,10 @@ static int filterentries(char *path, char *lastname)
if (len == 1) {
switch (*ch) {
case '=': // fallthrough /* Launch app */
case ']': // fallthorugh /*Prompt key */
case ']': // fallthorugh /* Prompt key */
case ';': // fallthrough /* Run plugin key */
case ',': // fallthrough /* Pin CWD */
case '~': // fallthrough /* Go HOME */
case '?': /* Help and config key, '?' is an invalid regex */
goto end;
}