diff --git a/src/builtin_set_color.cpp b/src/builtin_set_color.cpp index ab9532f47..89c5fb20c 100644 --- a/src/builtin_set_color.cpp +++ b/src/builtin_set_color.cpp @@ -137,7 +137,8 @@ int builtin_set_color(parser_t &parser, io_streams_t &streams, wchar_t **argv) { return STATUS_CMD_OK; } case ':': { - builtin_missing_argument(parser, streams, cmd, argv[w.woptind - 1]); + // We don't error here because "-b" is the only option that requires an argument, + // and we don't error for missing colors. return STATUS_INVALID_ARGS; } case '?': { @@ -160,12 +161,6 @@ int builtin_set_color(parser_t &parser, io_streams_t &streams, wchar_t **argv) { fgcolors.push_back(fg); } - if (fgcolors.empty() && bgcolor == nullptr && !bold && !underline && !italics && !dim && - !reverse) { - streams.err.append_format(_(L"%ls: Expected an argument\n"), argv[0]); - return STATUS_INVALID_ARGS; - } - // #1323: We may have multiple foreground colors. Choose the best one. If we had no foreground // color, we'll get none(); if we have at least one we expect not-none. const rgb_color_t fg = best_color(fgcolors, output_get_color_support());