File src/commands.c changed (mode: 100644) (index 436fdaf46..c66526c7e) |
... |
... |
help_cmd(const cmd_info_t *cmd_info) |
2262 |
2262 |
} |
} |
2263 |
2263 |
else |
else |
2264 |
2264 |
{ |
{ |
|
2265 |
|
#ifndef _WIN32 |
|
2266 |
|
char *escaped; |
|
2267 |
|
#endif |
|
2268 |
|
|
2265 |
2269 |
if(cmd_info->argc != 0) |
if(cmd_info->argc != 0) |
2266 |
2270 |
{ |
{ |
2267 |
2271 |
status_bar_error("No arguments are allowed when 'vimhelp' option is off"); |
status_bar_error("No arguments are allowed when 'vimhelp' option is off"); |
|
... |
... |
help_cmd(const cmd_info_t *cmd_info) |
2270 |
2274 |
|
|
2271 |
2275 |
if(!path_exists_at(cfg.config_dir, VIFM_HELP)) |
if(!path_exists_at(cfg.config_dir, VIFM_HELP)) |
2272 |
2276 |
{ |
{ |
2273 |
|
show_error_msgf("No help file", |
|
2274 |
|
"Can't find \"%s/" VIFM_HELP "\" file", cfg.config_dir); |
|
|
2277 |
|
show_error_msgf("No help file", "Can't find \"%s/" VIFM_HELP "\" file", |
|
2278 |
|
cfg.config_dir); |
2275 |
2279 |
return 0; |
return 0; |
2276 |
2280 |
} |
} |
2277 |
2281 |
|
|
2278 |
|
snprintf(buf, sizeof(buf), "%s %s/" VIFM_HELP, get_vicmd(&bg), |
|
|
2282 |
|
#ifndef _WIN32 |
|
2283 |
|
escaped = escape_filename(cfg.config_dir, 0); |
|
2284 |
|
snprintf(buf, sizeof(buf), "%s %s/" VIFM_HELP, get_vicmd(&bg), escaped); |
|
2285 |
|
free(escaped); |
|
2286 |
|
#else |
|
2287 |
|
snprintf(buf, sizeof(buf), "%s \"%s/" VIFM_HELP "\"", get_vicmd(&bg), |
2279 |
2288 |
cfg.config_dir); |
cfg.config_dir); |
|
2289 |
|
#endif |
2280 |
2290 |
} |
} |
2281 |
2291 |
|
|
2282 |
2292 |
if(bg) |
if(bg) |