From ebdbe2a07130ae5a42eea43796f85c98210a98dc Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Thu, 30 Sep 2021 13:45:54 -0700 Subject: [PATCH] Allow printing of fish theme if one has been set --- assets/default/fish/functions/fish_theme.fish | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/assets/default/fish/functions/fish_theme.fish b/assets/default/fish/functions/fish_theme.fish index 538fa24..65ef765 100644 --- a/assets/default/fish/functions/fish_theme.fish +++ b/assets/default/fish/functions/fish_theme.fish @@ -1,9 +1,17 @@ -function fish_theme --description "Sets fish theme" +# Variable to hold the currently set fish theme +set -gx current_fish_theme unknown + +function fish_theme --description "Sets fish theme" --argument-names "theme_name" + if not set -q argv[1] + echo "$current_fish_theme" + return + end set -l theme_name $argv[1] for p in $fish_themes_path set -l theme_file "$p/$theme_name.fish" if test -f "$theme_file" source "$theme_file" + set -gx current_fish_theme "$theme_name" return end end