More theme functions

- `fish_list_themes`
- `fish_theme`
This commit is contained in:
Candifloss 2026-07-17 10:33:51 +05:30
parent fd4bb034d8
commit 4ef1672e51
3 changed files with 20 additions and 1 deletions

View File

@ -1,6 +1,15 @@
# Prompt theme # Prompt theme
# Set the theme name. Default: "default" # To get a list of available themes:
# - Check the theme directories in $__fish_config_dir/themes/
# - Or use the funtion `fish_list_themes`
# To print the active prompt theme name:
# Use function `fish_theme`
# Set the theme name.
# Default: "default"
# The theme name must match the theme directory name.
set -g FISH_PROMPT_THEME default set -g FISH_PROMPT_THEME default
# Load theme
fish_load_theme $FISH_PROMPT_THEME fish_load_theme $FISH_PROMPT_THEME

View File

@ -0,0 +1,7 @@
function fish_list_themes --description "List available prompt themes"
for theme in $__fish_config_dir/themes/*
if test -d $theme
basename $theme
end
end
end

View File

@ -0,0 +1,3 @@
function fish_theme --description "Print the active prompt theme"
echo $FISH_PROMPT_THEME
end