diff options
Diffstat (limited to 'degesch.c')
| -rw-r--r-- | degesch.c | 9 | 
1 files changed, 5 insertions, 4 deletions
| @@ -12188,8 +12188,9 @@ handle_command_help (struct handler_args *a)  	if (!*a->arguments)  		return show_command_list (ctx); -	// TODO: we should probably also accept commands names with a leading slash -	char *command = cut_word (&a->arguments); +	const char *word = cut_word (&a->arguments); + +	const char *command = word + (*word == '/');  	for (size_t i = 0; i < N_ELEMENTS (g_command_handlers); i++)  	{  		struct command_handler *handler = &g_command_handlers[i]; @@ -12197,13 +12198,13 @@ handle_command_help (struct handler_args *a)  			return show_command_help (ctx, handler);  	} -	if (try_handle_command_help_option (ctx, command)) +	if (try_handle_command_help_option (ctx, word))  		return true;  	if (str_map_find (get_aliases_config (ctx), command))  		log_global_status (ctx, "/#s is an alias", command);  	else -		log_global_error (ctx, "#s: #s", "No such command or option", command); +		log_global_error (ctx, "#s: #s", "No such command or option", word);  	return true;  } | 
