mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Allow set_color options in general for linux VTs
This commit is contained in:
parent
2587bbc4a7
commit
b231ab7238
1 changed files with 9 additions and 3 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue