File src/cmd_handlers.c changed (mode: 100644) (index 3c2c93074..0f70249e2) |
... |
... |
emark_cmd(const cmd_info_t *cmd_info) |
968 |
968 |
} |
} |
969 |
969 |
|
|
970 |
970 |
flags = (MacroFlags)cmd_info->usr1; |
flags = (MacroFlags)cmd_info->usr1; |
971 |
|
handled = run_ext_command(com, flags, cmd_info->bg, &save_msg); |
|
|
971 |
|
handled = rn_ext(com, flags, cmd_info->bg, &save_msg); |
972 |
972 |
if(handled > 0) |
if(handled > 0) |
973 |
973 |
{ |
{ |
974 |
974 |
/* Do nothing. */ |
/* Do nothing. */ |
|
... |
... |
usercmd_cmd(const cmd_info_t *cmd_info) |
4917 |
4917 |
|
|
4918 |
4918 |
flist_sel_stash(curr_view); |
flist_sel_stash(curr_view); |
4919 |
4919 |
|
|
4920 |
|
handled = run_ext_command(expanded_com, flags, bg, &save_msg); |
|
|
4920 |
|
handled = rn_ext(expanded_com, flags, bg, &save_msg); |
4921 |
4921 |
if(handled > 0) |
if(handled > 0) |
4922 |
4922 |
{ |
{ |
4923 |
4923 |
/* Do nothing. */ |
/* Do nothing. */ |
File src/running.c changed (mode: 100644) (index e4a89415f..62be457af) |
... |
... |
run_explicit_prog(const char prog_spec[], int pause, int force_bg) |
567 |
567 |
bg = !pause && (bg || force_bg); |
bg = !pause && (bg || force_bg); |
568 |
568 |
|
|
569 |
569 |
save_msg = 0; |
save_msg = 0; |
570 |
|
if(run_ext_command(cmd, flags, bg, &save_msg) != 0) |
|
|
570 |
|
if(rn_ext(cmd, flags, bg, &save_msg) != 0) |
571 |
571 |
{ |
{ |
572 |
572 |
if(save_msg) |
if(save_msg) |
573 |
573 |
{ |
{ |
|
... |
... |
run_explicit_prog(const char prog_spec[], int pause, int force_bg) |
576 |
576 |
} |
} |
577 |
577 |
else if(bg) |
else if(bg) |
578 |
578 |
{ |
{ |
579 |
|
assert(flags != MF_IGNORE && "This case is for run_ext_command()"); |
|
|
579 |
|
assert(flags != MF_IGNORE && "This case is for rn_ext()"); |
580 |
580 |
(void)bg_run_external(cmd, flags == MF_IGNORE, SHELL_BY_USER); |
(void)bg_run_external(cmd, flags == MF_IGNORE, SHELL_BY_USER); |
581 |
581 |
} |
} |
582 |
582 |
else |
else |
|
... |
... |
try_run_with_filetype(view_t *view, const assoc_records_t assocs, |
1165 |
1165 |
} |
} |
1166 |
1166 |
|
|
1167 |
1167 |
int |
int |
1168 |
|
run_ext_command(const char cmd[], MacroFlags flags, int bg, int *save_msg) |
|
|
1168 |
|
rn_ext(const char cmd[], MacroFlags flags, int bg, int *save_msg) |
1169 |
1169 |
{ |
{ |
1170 |
1170 |
if(bg && flags != MF_NONE && flags != MF_NO_TERM_MUX && flags != MF_IGNORE) |
if(bg && flags != MF_NONE && flags != MF_NO_TERM_MUX && flags != MF_IGNORE) |
1171 |
1171 |
{ |
{ |
File src/running.h changed (mode: 100644) (index fea89267b..f8017cc5e) |
... |
... |
int rn_open_with_match(struct view_t *view, const char beginning[], |
76 |
76 |
* - > 0 -- handled, good to go; |
* - > 0 -- handled, good to go; |
77 |
77 |
* - = 0 -- not handled at all; |
* - = 0 -- not handled at all; |
78 |
78 |
* - < 0 -- handled, exit. */ |
* - < 0 -- handled, exit. */ |
79 |
|
int run_ext_command(const char cmd[], MacroFlags flags, int bg, int *save_msg); |
|
|
79 |
|
int rn_ext(const char cmd[], MacroFlags flags, int bg, int *save_msg); |
80 |
80 |
|
|
81 |
81 |
/* Runs the cmd and parses its output as list of paths to compose custom view. |
/* Runs the cmd and parses its output as list of paths to compose custom view. |
82 |
82 |
* Very custom view implies unsorted list. Returns zero on success, otherwise |
* Very custom view implies unsorted list. Returns zero on success, otherwise |