if (flag & F_SIGINT)
signal(SIGINT, SIG_DFL);
+
execlp(file, file, arg1, arg2, NULL);
_exit(1);
} else {
"e? Help, settings\n"
"eq Quit context\n"
"d^G Quit and cd\n"
- "aQ, ^X Quit\n\n"};
+ "aQ, ^Q Quit\n\n"};
if (fd == -1)
return -1;
r = mkpath(path, dents[cur].name, newpath, PATH_MAX);
if (!appendfpath(newpath, r))
goto nochange;
+
++ncp;
printmsg(newpath);
} else if (cfg.quote) {
writecp(newpath, r - 1); /* Truncate NULL from end */
else
spawn(copier, newpath, NULL, NULL, F_NOTRACE);
+
printmsg(newpath);
}
goto nochange;
else
printmsg("multi-copy off");
goto nochange;
+ case SEL_CP:
+ case SEL_MV:
+ case SEL_RMMUL:
+ {
+ char *cmd;
+
+ if (!g_cppath[0]) {
+ printmsg("copy file not found");
+ goto nochange;
+ }
+
+ if (sel == SEL_CP)
+ r = asprintf(&cmd, "xargs -0 -d \'\n\' -a %s cp -ir --preserve=all -t .", g_cppath);
+ else if (sel == SEL_MV)
+ r = asprintf(&cmd, "xargs -0 -d \'\n\' -a %s mv -i -t .", g_cppath);
+ else /* SEL_RMMUL */
+ r = asprintf(&cmd, "xargs -0 -d \'\n\' -a %s rm -Ir", g_cppath);
+
+ if (r == -1) {
+ printwarn();
+ goto nochange;
+ }
+ spawn("sh", "-c", cmd, path, F_NORMAL | F_SIGINT);
+ free(cmd);
+
+ copycurname();
+ if (cfg.filtermode)
+ presel = FILTER;
+ goto begin;
+ }
+ case SEL_RM:
+ lastname[0] = '\0';
+ if (cfg.filtermode)
+ presel = FILTER;
+ goto begin;
case SEL_QUOTE:
cfg.quote ^= 1;
DPRINTF_D(cfg.quote);
SEL_COPY,
SEL_COPYMUL,
SEL_COPYLIST,
+ SEL_CP,
+ SEL_MV,
+ SEL_RMMUL,
+ SEL_RM,
SEL_QUOTE,
SEL_OPEN,
SEL_NEW,
{ CONTROL('Y'), SEL_COPYMUL, "", "" },
/* Show list of copied files */
{ 'y', SEL_COPYLIST, "", "" },
+ /* Copy from copy buffer */
+ { 'P', SEL_CP, "", "" },
+ /* Move from copy buffer */
+ { 'V', SEL_MV, "", "" },
+ /* Delete from copy buffer */
+ { CONTROL('X'), SEL_RMMUL, "", "" },
+ /* Delete currently selected */
+ { 'X', SEL_RM, "", "" },
/* Toggle quote on while copy */
{ CONTROL('T'), SEL_QUOTE, "", "" },
/* Open in a custom application */
/* Change dir on quit */
{ CONTROL('G'), SEL_CDQUIT, "", "" },
/* Quit */
- { 'Q', SEL_QUIT, "", "" },
- { CONTROL('X'), SEL_QUIT, "", "" },
+ { 'Q', SEL_QUIT, "", "" },
+ { CONTROL('Q'), SEL_QUIT, "", "" },
};