mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-25 20:33:08 +00:00
Make set_color fail silently if there is no argument (reintroducing
469743c
). Fixes #1335
This commit is contained in:
parent
42166be22e
commit
c1f64ba017
1 changed files with 6 additions and 0 deletions
|
@ -81,6 +81,12 @@ static int builtin_set_color(parser_t &parser, wchar_t **argv)
|
|||
|
||||
int argc = builtin_count_args(argv);
|
||||
|
||||
/* Some code passes variables to set_color that don't exist, like $fish_user_whatever. As a hack, quietly return failure. */
|
||||
if (argc <= 1)
|
||||
{
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
const wchar_t *bgcolor = NULL;
|
||||
bool bold = false, underline=false;
|
||||
int errret;
|
||||
|
|
Loading…
Reference in a new issue