File src/cmd_handlers.c changed (mode: 100644) (index 2722f40ba..3c2c93074) |
... |
... |
file_cmd(const cmd_info_t *cmd_info) |
2205 |
2205 |
return show_file_menu(curr_view, cmd_info->bg) != 0; |
return show_file_menu(curr_view, cmd_info->bg) != 0; |
2206 |
2206 |
} |
} |
2207 |
2207 |
|
|
2208 |
|
if(run_with_filetype(curr_view, cmd_info->argv[0], cmd_info->bg) != 0) |
|
|
2208 |
|
if(rn_open_with_match(curr_view, cmd_info->argv[0], cmd_info->bg) != 0) |
2209 |
2209 |
{ |
{ |
2210 |
2210 |
ui_sb_err("Can't find associated program with requested beginning"); |
ui_sb_err("Can't find associated program with requested beginning"); |
2211 |
2211 |
return 1; |
return 1; |
File src/running.c changed (mode: 100644) (index a21408b10..e4a89415f) |
... |
... |
set_pwd_in_screen(const char path[]) |
1119 |
1119 |
} |
} |
1120 |
1120 |
|
|
1121 |
1121 |
int |
int |
1122 |
|
run_with_filetype(view_t *view, const char beginning[], int background) |
|
|
1122 |
|
rn_open_with_match(view_t *view, const char beginning[], int background) |
1123 |
1123 |
{ |
{ |
1124 |
1124 |
dir_entry_t *const curr = get_current_entry(view); |
dir_entry_t *const curr = get_current_entry(view); |
1125 |
1125 |
assoc_records_t ft, magic; |
assoc_records_t ft, magic; |
File src/running.h changed (mode: 100644) (index a975f5e8b..fea89267b) |
... |
... |
void rn_leave(struct view_t *view, int levels); |
67 |
67 |
int rn_shell(const char command[], ShellPause pause, int use_term_multiplexer, |
int rn_shell(const char command[], ShellPause pause, int use_term_multiplexer, |
68 |
68 |
ShellRequester by); |
ShellRequester by); |
69 |
69 |
|
|
70 |
|
/* Returns zero on successful running. */ |
|
71 |
|
int run_with_filetype(struct view_t *view, const char beginning[], |
|
|
70 |
|
/* Looks for a unique program match for a given prefix and uses it. Returns |
|
71 |
|
* zero on success and non-zero otherwise. */ |
|
72 |
|
int rn_open_with_match(struct view_t *view, const char beginning[], |
72 |
73 |
int background); |
int background); |
73 |
74 |
|
|
74 |
75 |
/* Handles most of command handling variants. Returns: |
/* Handles most of command handling variants. Returns: |