- FreeDesktop compliant trash (needs trash-cli)
- SSHFS mounts (needs sshfs)
- Mouse support
- - Create, rename files and directories
+ - Create, rename, duplicate files and directories
- Show copy, move progress on Linux (needs avdcpmv)
- Per-context directory color (default: blue)
- Spawn a shell in the current directory
Q ^Q Quit ? Help, config
FILES
^O Open with... n Create new/link
- D File details ^R Rename entry
+ D File details ^R Rename/duplicate
⎵ ^K / Y Select entry/all r Batch rename
K ^Y Toggle selection y List selection
P Copy selection X Delete selection
"9Q ^Q Quit ? Help, config\n"
"1FILES\n"
"b^O Open with... n Create new/link\n"
- "cD File details ^R Rename entry\n"
+ "cD File details ^R Rename/duplicate\n"
"5⎵ ^K / Y Select entry/all r Batch rename\n"
"9K ^Y Toggle selection y List selection\n"
"cP Copy selection X Delete selection\n"
case SEL_ARCHIVE: // fallthrough
case SEL_NEW:
{
+ int dup = 'n';
+
switch (sel) {
case SEL_ARCHIVE:
r = get_input("archive selection (else current)? [y/Y confirms]");
tmp = xreadline(NULL, "name/link suffix [@ for none]: ");
break;
default: /* SEL_RENAME */
+ dup = get_input("duplicate? [y/Y confirms]");
tmp = xreadline(dents[cur].name, "");
break;
}
if (sel == SEL_RENAME) {
/* Rename the file */
- if (renameat(fd, dents[cur].name, fd, tmp) != 0) {
+ if (dup == 'y' || dup == 'Y') {
+ spawn("cp -r", dents[cur].name, tmp, path, F_CLI | F_NOTRACE);
+ } else if (renameat(fd, dents[cur].name, fd, tmp) != 0) {
close(fd);
printwarn(&presel);
goto nochange;