File src/flist_sel.c changed (mode: 100644) (index be99d1c2b..78b45636a) |
... |
... |
flist_sel_by_filter(view_t *view, const char cmd[], int erase_old, int select) |
257 |
257 |
|
|
258 |
258 |
char *const expanded_cmd = ma_expand(cmd, NULL, NULL, 1); |
char *const expanded_cmd = ma_expand(cmd, NULL, NULL, 1); |
259 |
259 |
|
|
260 |
|
if(run_cmd_for_output(expanded_cmd, &files, &nfiles) != 0) |
|
|
260 |
|
if(rn_for_lines(expanded_cmd, &files, &nfiles) != 0) |
261 |
261 |
{ |
{ |
262 |
262 |
free(expanded_cmd); |
free(expanded_cmd); |
263 |
263 |
ui_sb_err("Failed to start/read output of external command"); |
ui_sb_err("Failed to start/read output of external command"); |
File src/running.h changed (mode: 100644) (index 10630b650..4bcb2a703) |
... |
... |
int rn_ext(const char cmd[], MacroFlags flags, int bg, int *save_msg); |
84 |
84 |
int rn_for_flist(struct view_t *view, const char cmd[], int very, |
int rn_for_flist(struct view_t *view, const char cmd[], int very, |
85 |
85 |
int interactive); |
int interactive); |
86 |
86 |
|
|
87 |
|
/* Executes external command capturing its output as list of lines. Sets *files |
|
88 |
|
* and *nfiles. Returns zero on success, otherwise non-zero is returned. */ |
|
89 |
|
int run_cmd_for_output(const char cmd[], char ***files, int *nfiles); |
|
|
87 |
|
/* Executes external command capturing its output as list of lines. Sets *lines |
|
88 |
|
* and *nlines. Returns zero on success, otherwise non-zero is returned. */ |
|
89 |
|
int rn_for_lines(const char cmd[], char ***lines, int *nlines); |
90 |
90 |
|
|
91 |
91 |
#endif /* VIFM__RUNNING_H__ */ |
#endif /* VIFM__RUNNING_H__ */ |
92 |
92 |
|
|