New shortcut ^] to spawn shell in current dir

This commit is contained in:
Arun Prakash Jana 2018-03-30 20:53:25 +05:30
parent 0bb05104b3
commit 1e1708c2ec
No known key found for this signature in database
GPG Key ID: A75979F35C080412
4 changed files with 5 additions and 3 deletions

View File

@ -231,7 +231,7 @@ optional arguments:
s | Toggle sort by size
S, ^J | Toggle du mode
t | Toggle sort by mtime
! | Spawn SHELL in dir
!, ^] | Spawn SHELL in dir
R | Run custom script
e | Edit entry in EDITOR
o | Open dir in file manager

2
nnn.1
View File

@ -90,7 +90,7 @@ Toggle sort by file size
Toggle disk usage analyzer mode
.It Ic t
Toggle sort by time modified
.It Ic \&!
.It Ic \&!, ^]
Spawn SHELL in PWD (fallback sh)
.It Ic R
Run a custom script

3
nnn.c
View File

@ -1155,6 +1155,7 @@ filterentries(char *path)
case CONTROL('B'): // fallthrough
case CONTROL('V'): // fallthrough
case CONTROL('J'): // fallthrough
case CONTROL(']'): // fallthrough
case CONTROL('G'): // fallthrough
case CONTROL('X'): // fallthrough
case CONTROL('F'): // fallthrough
@ -1956,7 +1957,7 @@ show_help(char *path)
"es | Toggle sort by size\n"
"aS, ^J | Toggle du mode\n"
"et | Toggle sort by mtime\n"
"e! | Spawn SHELL in dir\n"
"a!, ^] | Spawn SHELL in dir\n"
"eR | Run custom script\n"
"ee | Edit entry in EDITOR\n"
"eo | Open dir in file manager\n"

1
nnn.h
View File

@ -167,6 +167,7 @@ static struct key bindings[] = {
{ '?', SEL_HELP, "", "" },
/* Run command */
{ '!', SEL_RUN, "sh", "SHELL" },
{ CONTROL(']'), SEL_RUN, "sh", "SHELL" },
/* Run a custom script */
{ 'R', SEL_RUNSCRIPT, "sh", "SHELL" },
/* Run command with argument */