diff --git a/cmd/command.c b/cmd/command.c index 11151aa..4ad6b70 100644 --- a/cmd/command.c +++ b/cmd/command.c @@ -3,7 +3,6 @@ #include #include #include -#include #include #include #include @@ -313,20 +312,20 @@ static void get_command_string(struct b_command *cmd, b_string *out) r++; } - if (r == 1) { - b_string_append_cstr(out, ", "); - } - if (cmd->b_short_name) { + if (r > 0) { + b_string_append_cstr(out, ", "); + } + b_string_append_cstrf(out, F_GREEN "-%c" F_RESET, cmd->b_short_name); r++; } - if (r == 2) { - b_string_append_cstr(out, ", "); - } - if (cmd->b_long_name) { + if (r > 0) { + b_string_append_cstr(out, ", "); + } + b_string_append_cstrf(out, F_GREEN "--%s" F_RESET, cmd->b_long_name); r++; }