]> Sergey Matveev's repositories - nnn.git/commitdiff
Treat ~ as special shortcut in filterentries
authorArun Prakash Jana <engineerarun@gmail.com>
Sat, 22 Feb 2020 15:50:20 +0000 (21:20 +0530)
committerArun Prakash Jana <engineerarun@gmail.com>
Sat, 22 Feb 2020 15:55:05 +0000 (21:25 +0530)
nnn.1
src/nnn.c

diff --git a/nnn.1 b/nnn.1
index 363410b1d3e9e6859ddf499a61f56fb1bcbe0016..e02ee69b5554e1d436c978804d8e1d8aa0f79de0 100644 (file)
--- a/nnn.1
+++ b/nnn.1
@@ -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
index ae7a906d7011e85570d81fdf2cb099092e5e3e19..4be2a784bcd35759b71338a72fe55701af58c475 100644 (file)
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -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;
                        }