From f3eb75a432979321ec69dd04e6ba5e20ad31d2ec Mon Sep 17 00:00:00 2001 From: Charles Gould Date: Sat, 21 Mar 2020 21:57:49 -0500 Subject: [PATCH] fish: add '--plain' option to fish_colors function --- fish/functions/fish_colors.fish | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fish/functions/fish_colors.fish b/fish/functions/fish_colors.fish index 9c492f6..4f18e13 100644 --- a/fish/functions/fish_colors.fish +++ b/fish/functions/fish_colors.fish @@ -1,5 +1,14 @@ function fish_colors --description 'Print the fish color variables' + set --local plain 0 + if contains -- '--plain' $argv + set plain 1 + end + for i in (set -n | string match 'fish*_color*') - echo $i (set_color $$i)$$i(set_color normal) + if test $plain -eq 1 + echo $i $$i + else + echo $i (set_color $$i)$$i(set_color normal) + end end end