Made set_color with no arguments not complain, so that prompts like Terlar don't produce errors for missing colors.

This commit is contained in:
ridiculousfish 2012-10-17 01:25:21 -07:00
parent 91e1d59869
commit 469743cd23

View file

@ -182,6 +182,10 @@ static unsigned char index_for_color(rgb_color_t c) {
int main( int argc, char **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;
char *bgcolor=0;
char *fgcolor=0;
bool bold=false;