More theme functions
- `fish_list_themes` - `fish_theme`
This commit is contained in:
parent
fd4bb034d8
commit
4ef1672e51
@ -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
|
||||||
7
functions/fish_list_themes.fish
Normal file
7
functions/fish_list_themes.fish
Normal 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
|
||||||
3
functions/fish_theme.fish
Normal file
3
functions/fish_theme.fish
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
function fish_theme --description "Print the active prompt theme"
|
||||||
|
echo $FISH_PROMPT_THEME
|
||||||
|
end
|
||||||
Loading…
x
Reference in New Issue
Block a user