mirror of
https://github.com/jarun/nnn.git
synced 2025-01-24 09:46:38 +00:00
Support no suffix for link name
This commit is contained in:
parent
c92715a01d
commit
2b79d237cc
|
@ -3395,7 +3395,7 @@ nochange:
|
||||||
tmp = xreadline(NULL, "open with: ");
|
tmp = xreadline(NULL, "open with: ");
|
||||||
break;
|
break;
|
||||||
case SEL_NEW:
|
case SEL_NEW:
|
||||||
tmp = xreadline(NULL, "name/link suffix: ");
|
tmp = xreadline(NULL, "name/link suffix [@ for no suffix]: ");
|
||||||
break;
|
break;
|
||||||
default: /* SEL_RENAME */
|
default: /* SEL_RENAME */
|
||||||
tmp = xreadline(dents[cur].name, "");
|
tmp = xreadline(dents[cur].name, "");
|
||||||
|
@ -3494,6 +3494,8 @@ nochange:
|
||||||
} else if (r == 'd') {
|
} else if (r == 'd') {
|
||||||
r = mkdirat(fd, tmp, 0777);
|
r = mkdirat(fd, tmp, 0777);
|
||||||
} else if (r == 's' || r == 'h') {
|
} else if (r == 's' || r == 'h') {
|
||||||
|
if (tmp[0] == '@' && tmp[1] == '\0')
|
||||||
|
tmp[0] = '\0';
|
||||||
r = xlink(tmp, path, newpath, r);
|
r = xlink(tmp, path, newpath, r);
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue