From: Arun Prakash Jana Date: Sun, 4 Aug 2019 06:18:45 +0000 (+0530) Subject: Ask for 'd' to duplicate X-Git-Tag: v2.6~5 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=4c4db1430e7725dff5cce347e8b9f583362bda9d;p=nnn.git Ask for 'd' to duplicate --- diff --git a/src/nnn.c b/src/nnn.c index 808eaf61..c7179d4d 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -4188,7 +4188,7 @@ nochange: tmp = xreadline(NULL, "name/link suffix [@ for none]: "); break; default: /* SEL_RENAME */ - dup = get_input("duplicate? [y/Y confirms]"); + dup = get_input("Press 'd' to duplicate"); tmp = xreadline(dents[cur].name, ""); break; } @@ -4273,9 +4273,9 @@ nochange: if (sel == SEL_RENAME) { /* Rename the file */ - if (dup == 'y' || dup == 'Y') { + if (dup == 'd') 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); printwarn(&presel); goto nochange;