File src/cmd_handlers.c changed (mode: 100644) (index f1d43cba4..2722f40ba) |
... |
... |
emark_cmd(const cmd_info_t *cmd_info) |
991 |
991 |
char *const buf = fast_run_complete(com); |
char *const buf = fast_run_complete(com); |
992 |
992 |
if(buf != NULL) |
if(buf != NULL) |
993 |
993 |
{ |
{ |
994 |
|
(void)shellout(buf, cmd_info->emark ? PAUSE_ALWAYS : PAUSE_ON_ERROR, |
|
|
994 |
|
(void)rn_shell(buf, cmd_info->emark ? PAUSE_ALWAYS : PAUSE_ON_ERROR, |
995 |
995 |
use_term_mux, SHELL_BY_USER); |
use_term_mux, SHELL_BY_USER); |
996 |
996 |
free(buf); |
free(buf); |
997 |
997 |
} |
} |
998 |
998 |
} |
} |
999 |
999 |
else |
else |
1000 |
1000 |
{ |
{ |
1001 |
|
(void)shellout(com, cmd_info->emark ? PAUSE_ALWAYS : PAUSE_ON_ERROR, |
|
|
1001 |
|
(void)rn_shell(com, cmd_info->emark ? PAUSE_ALWAYS : PAUSE_ON_ERROR, |
1002 |
1002 |
use_term_mux, SHELL_BY_USER); |
use_term_mux, SHELL_BY_USER); |
1003 |
1003 |
} |
} |
1004 |
1004 |
} |
} |
|
... |
... |
shell_cmd(const cmd_info_t *cmd_info) |
3815 |
3815 |
|
|
3816 |
3816 |
/* Run shell with clean PATH environment variable. */ |
/* Run shell with clean PATH environment variable. */ |
3817 |
3817 |
load_clean_path_env(); |
load_clean_path_env(); |
3818 |
|
shellout(sh, PAUSE_NEVER, cmd_info->emark ? 0 : 1, SHELL_BY_APP); |
|
|
3818 |
|
rn_shell(sh, PAUSE_NEVER, cmd_info->emark ? 0 : 1, SHELL_BY_APP); |
3819 |
3819 |
load_real_path_env(); |
load_real_path_env(); |
3820 |
3820 |
|
|
3821 |
3821 |
return 0; |
return 0; |
|
... |
... |
usercmd_cmd(const cmd_info_t *cmd_info) |
4952 |
4952 |
} |
} |
4953 |
4953 |
else if(strlen(com_beginning) > 0) |
else if(strlen(com_beginning) > 0) |
4954 |
4954 |
{ |
{ |
4955 |
|
shellout(com_beginning, pause ? PAUSE_ALWAYS : PAUSE_ON_ERROR, |
|
|
4955 |
|
rn_shell(com_beginning, pause ? PAUSE_ALWAYS : PAUSE_ON_ERROR, |
4956 |
4956 |
flags != MF_NO_TERM_MUX, SHELL_BY_USER); |
flags != MF_NO_TERM_MUX, SHELL_BY_USER); |
4957 |
4957 |
} |
} |
4958 |
4958 |
} |
} |
|
... |
... |
usercmd_cmd(const cmd_info_t *cmd_info) |
4975 |
4975 |
} |
} |
4976 |
4976 |
else |
else |
4977 |
4977 |
{ |
{ |
4978 |
|
shellout(expanded_com, PAUSE_ON_ERROR, flags != MF_NO_TERM_MUX, |
|
|
4978 |
|
rn_shell(expanded_com, PAUSE_ON_ERROR, flags != MF_NO_TERM_MUX, |
4979 |
4979 |
SHELL_BY_USER); |
SHELL_BY_USER); |
4980 |
4980 |
} |
} |
4981 |
4981 |
|
|
File src/int/vim.c changed (mode: 100644) (index 36b0623c1..3f2a6c69e) |
... |
... |
run_vim(const char cmd[], int bg, int use_term_multiplexer) |
225 |
225 |
return bg_run_external(cmd, 0, SHELL_BY_APP); |
return bg_run_external(cmd, 0, SHELL_BY_APP); |
226 |
226 |
} |
} |
227 |
227 |
|
|
228 |
|
return shellout(cmd, PAUSE_ON_ERROR, use_term_multiplexer, SHELL_BY_APP); |
|
|
228 |
|
return rn_shell(cmd, PAUSE_ON_ERROR, use_term_multiplexer, SHELL_BY_APP); |
229 |
229 |
} |
} |
230 |
230 |
|
|
231 |
231 |
int |
int |
File src/menus/apropos_menu.c changed (mode: 100644) (index 45583e260..c6db231d8) |
... |
... |
execute_apropos_cb(view_t *view, menu_data_t *m) |
82 |
82 |
snprintf(command, sizeof(command), "man %s %s", section, topic); |
snprintf(command, sizeof(command), "man %s %s", section, topic); |
83 |
83 |
|
|
84 |
84 |
curr_stats.skip_shellout_redraw = 1; |
curr_stats.skip_shellout_redraw = 1; |
85 |
|
exit_code = shellout(command, PAUSE_NEVER, 1, SHELL_BY_APP); |
|
|
85 |
|
exit_code = rn_shell(command, PAUSE_NEVER, 1, SHELL_BY_APP); |
86 |
86 |
curr_stats.skip_shellout_redraw = 0; |
curr_stats.skip_shellout_redraw = 0; |
87 |
87 |
|
|
88 |
88 |
if(exit_code != 0) |
if(exit_code != 0) |
File src/menus/media_menu.c changed (mode: 100644) (index d88562b2f..2d9a82e67) |
... |
... |
mediaprg_mount(const char data[], menu_data_t *m) |
409 |
409 |
|
|
410 |
410 |
char *escaped_path = shell_like_escape(path, 0); |
char *escaped_path = shell_like_escape(path, 0); |
411 |
411 |
char *cmd = format_str("%s %s %s", cfg.media_prg, action, escaped_path); |
char *cmd = format_str("%s %s %s", cfg.media_prg, action, escaped_path); |
412 |
|
if(shellout(cmd, PAUSE_NEVER, 0, SHELL_BY_APP) == 0) |
|
|
412 |
|
if(rn_shell(cmd, PAUSE_NEVER, 0, SHELL_BY_APP) == 0) |
413 |
413 |
{ |
{ |
414 |
414 |
reload_list(m); |
reload_list(m); |
415 |
415 |
} |
} |
File src/running.c changed (mode: 100644) (index dd7797b1f..a21408b10) |
... |
... |
execute_file(const char full_path[], int elevate) |
361 |
361 |
{ |
{ |
362 |
362 |
#ifndef _WIN32 |
#ifndef _WIN32 |
363 |
363 |
char *const escaped = shell_like_escape(full_path, 0); |
char *const escaped = shell_like_escape(full_path, 0); |
364 |
|
shellout(escaped, PAUSE_ALWAYS, 1, SHELL_BY_APP); |
|
|
364 |
|
rn_shell(escaped, PAUSE_ALWAYS, 1, SHELL_BY_APP); |
365 |
365 |
free(escaped); |
free(escaped); |
366 |
366 |
#else |
#else |
367 |
367 |
char *const dquoted_full_path = strdup(enclose_in_dquotes(full_path)); |
char *const dquoted_full_path = strdup(enclose_in_dquotes(full_path)); |
|
... |
... |
run_explicit_prog(const char prog_spec[], int pause, int force_bg) |
581 |
581 |
} |
} |
582 |
582 |
else |
else |
583 |
583 |
{ |
{ |
584 |
|
(void)shellout(cmd, pause ? PAUSE_ALWAYS : PAUSE_ON_ERROR, |
|
|
584 |
|
(void)rn_shell(cmd, pause ? PAUSE_ALWAYS : PAUSE_ON_ERROR, |
585 |
585 |
flags != MF_NO_TERM_MUX, SHELL_BY_USER); |
flags != MF_NO_TERM_MUX, SHELL_BY_USER); |
586 |
586 |
} |
} |
587 |
587 |
|
|
|
... |
... |
run_implicit_prog(view_t *view, const char prog_spec[], int pause, int force_bg) |
621 |
621 |
} |
} |
622 |
622 |
else |
else |
623 |
623 |
{ |
{ |
624 |
|
(void)shellout(cmd, pause ? PAUSE_ALWAYS : PAUSE_ON_ERROR, 1, |
|
|
624 |
|
(void)rn_shell(cmd, pause ? PAUSE_ALWAYS : PAUSE_ON_ERROR, 1, |
625 |
625 |
SHELL_BY_USER); |
SHELL_BY_USER); |
626 |
626 |
} |
} |
627 |
627 |
} |
} |
|
... |
... |
extract_last_path_component(const char path[], char buf[]) |
794 |
794 |
} |
} |
795 |
795 |
|
|
796 |
796 |
int |
int |
797 |
|
shellout(const char command[], ShellPause pause, int use_term_multiplexer, |
|
|
797 |
|
rn_shell(const char command[], ShellPause pause, int use_term_multiplexer, |
798 |
798 |
ShellRequester by) |
ShellRequester by) |
799 |
799 |
{ |
{ |
800 |
800 |
char *cmd; |
char *cmd; |
File src/running.h changed (mode: 100644) (index 1968aca20..a975f5e8b) |
... |
... |
typedef enum |
32 |
32 |
} |
} |
33 |
33 |
FileHandleExec; |
FileHandleExec; |
34 |
34 |
|
|
35 |
|
/* When and why should we pause on shellout(). */ |
|
|
35 |
|
/* When and why should we pause on rn_shell(). */ |
36 |
36 |
typedef enum |
typedef enum |
37 |
37 |
{ |
{ |
38 |
38 |
PAUSE_ALWAYS, /* Execute command and pause. */ |
PAUSE_ALWAYS, /* Execute command and pause. */ |
|
... |
... |
void rn_leave(struct view_t *view, int levels); |
64 |
64 |
|
|
65 |
65 |
/* Executes command in a shell. Returns zero on success, otherwise non-zero is |
/* Executes command in a shell. Returns zero on success, otherwise non-zero is |
66 |
66 |
* returned. */ |
* returned. */ |
67 |
|
int shellout(const char command[], ShellPause pause, int use_term_multiplexer, |
|
|
67 |
|
int rn_shell(const char command[], ShellPause pause, int use_term_multiplexer, |
68 |
68 |
ShellRequester by); |
ShellRequester by); |
69 |
69 |
|
|
70 |
70 |
/* Returns zero on successful running. */ |
/* Returns zero on successful running. */ |
File src/utils/utils_nix.c changed (mode: 100644) (index a22a794d5..12fe172ae) |
... |
... |
format_help_cmd(char cmd[], size_t cmd_size) |
801 |
801 |
void |
void |
802 |
802 |
display_help(const char cmd[]) |
display_help(const char cmd[]) |
803 |
803 |
{ |
{ |
804 |
|
(void)shellout(cmd, PAUSE_ON_ERROR, 1, SHELL_BY_APP); |
|
|
804 |
|
(void)rn_shell(cmd, PAUSE_ON_ERROR, 1, SHELL_BY_APP); |
805 |
805 |
} |
} |
806 |
806 |
|
|
807 |
807 |
void |
void |