Allow set_color options in general for linux VTs

This commit is contained in:
Fabian Homborg 2015-09-10 15:12:02 +02:00
parent 2587bbc4a7
commit b231ab7238

View file

@ -297,11 +297,17 @@ function __fish_config_interactive -d "Initializations that should be performed
# Don't allow setting color other than what linux offers (see #2001) # Don't allow setting color other than what linux offers (see #2001)
functions -e set_color functions -e set_color
function set_color function set_color
set -l term_colors black red green yellow blue magenta cyan white normal --bold -o -c --print-colors -u --underline set -l term_colors black red green yellow blue magenta cyan white normal
for a in $argv for a in $argv
if not contains -- $a $term_colors if not contains -- $a $term_colors
echo "Color not valid in TERM = linux: $a" switch $a
return 1 # Also allow options
case "-*"
continue
case "*"
echo "Color not valid in TERM = linux: $a"
return 1
end
end end
end end
builtin set_color $argv builtin set_color $argv