mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
Archive: check archive mode first
This commit is contained in:
parent
cdcbb82a91
commit
0950f058f1
13
src/nnn.c
13
src/nnn.c
|
@ -3625,15 +3625,22 @@ nochange:
|
||||||
presel = FILTER;
|
presel = FILTER;
|
||||||
goto begin;
|
goto begin;
|
||||||
}
|
}
|
||||||
case SEL_ARCHIVE: // fallthrough
|
|
||||||
case SEL_OPENWITH: // fallthrough
|
case SEL_OPENWITH: // fallthrough
|
||||||
case SEL_RENAME:
|
case SEL_RENAME:
|
||||||
if (!ndents)
|
if (!ndents)
|
||||||
break; // fallthrough
|
break; // fallthrough
|
||||||
|
case SEL_ARCHIVE: // fallthrough
|
||||||
case SEL_NEW:
|
case SEL_NEW:
|
||||||
{
|
{
|
||||||
switch (sel) {
|
switch (sel) {
|
||||||
case SEL_ARCHIVE:
|
case SEL_ARCHIVE:
|
||||||
|
r = get_input("archive selection (else current)? [s]");
|
||||||
|
if (r == 's' && !cpsafe())
|
||||||
|
goto nochange;
|
||||||
|
else if (!ndents) {
|
||||||
|
printmsg("no files");
|
||||||
|
goto nochange;
|
||||||
|
}
|
||||||
tmp = xreadline(NULL, "archive name: ");
|
tmp = xreadline(NULL, "archive name: ");
|
||||||
break;
|
break;
|
||||||
case SEL_OPENWITH:
|
case SEL_OPENWITH:
|
||||||
|
@ -3670,11 +3677,7 @@ nochange:
|
||||||
goto nochange;
|
goto nochange;
|
||||||
}
|
}
|
||||||
|
|
||||||
r = get_input("archive selection (else current)? [s]");
|
|
||||||
if (r == 's') {
|
if (r == 's') {
|
||||||
if (!cpsafe())
|
|
||||||
goto nochange;
|
|
||||||
|
|
||||||
snprintf(g_buf, CMD_LEN_MAX,
|
snprintf(g_buf, CMD_LEN_MAX,
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
"xargs -0 -a %s %s %s",
|
"xargs -0 -a %s %s %s",
|
||||||
|
|
Loading…
Reference in a new issue