mirror of
https://github.com/jarun/nnn.git
synced 2025-01-24 17:56:41 +00:00
Ask for 'd' to duplicate
This commit is contained in:
parent
9fdfd9388d
commit
4c4db1430e
|
@ -4188,7 +4188,7 @@ nochange:
|
||||||
tmp = xreadline(NULL, "name/link suffix [@ for none]: ");
|
tmp = xreadline(NULL, "name/link suffix [@ for none]: ");
|
||||||
break;
|
break;
|
||||||
default: /* SEL_RENAME */
|
default: /* SEL_RENAME */
|
||||||
dup = get_input("duplicate? [y/Y confirms]");
|
dup = get_input("Press 'd' to duplicate");
|
||||||
tmp = xreadline(dents[cur].name, "");
|
tmp = xreadline(dents[cur].name, "");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -4273,9 +4273,9 @@ nochange:
|
||||||
|
|
||||||
if (sel == SEL_RENAME) {
|
if (sel == SEL_RENAME) {
|
||||||
/* Rename the file */
|
/* Rename the file */
|
||||||
if (dup == 'y' || dup == 'Y') {
|
if (dup == 'd')
|
||||||
spawn("cp -r", dents[cur].name, tmp, path, F_CLI | F_NOTRACE);
|
spawn("cp -r", dents[cur].name, tmp, path, F_CLI | F_NOTRACE);
|
||||||
} else if (renameat(fd, dents[cur].name, fd, tmp) != 0) {
|
else if (renameat(fd, dents[cur].name, fd, tmp) != 0) {
|
||||||
close(fd);
|
close(fd);
|
||||||
printwarn(&presel);
|
printwarn(&presel);
|
||||||
goto nochange;
|
goto nochange;
|
||||||
|
|
Loading…
Reference in a new issue