mirror of
https://github.com/oh-my-fish/oh-my-fish.git
synced 2024-11-25 09:41:40 +08:00
Enable conf.d loading for themes (#713)
Loading of conf.d files for the current theme is done after all other initialisation to ensure that everything the files need is loaded.
This commit is contained in:
parent
affb0b144b
commit
c8337b654e
|
@ -48,4 +48,9 @@ end
|
|||
emit perf:timer:start "Oh My Fish init user config path"
|
||||
require --no-bundle --path $OMF_CONFIG
|
||||
emit perf:timer:finish "Oh My Fish init user config path"
|
||||
# Load conf.d for current theme if exists
|
||||
set -l theme_conf_path {$OMF_CONFIG,$OMF_PATH}/themes*/$theme/conf.d
|
||||
for conf in $theme_conf_path/*.fish
|
||||
source $conf
|
||||
end
|
||||
emit perf:timer:finish "Oh My Fish initialisation"
|
||||
|
|
|
@ -37,6 +37,11 @@ function omf.theme.set -a target_theme
|
|||
and test -e $OMF_CONFIG/key_bindings.fish -o -e $OMF_PATH/key_bindings.fish
|
||||
and __fish_reload_key_bindings
|
||||
|
||||
# Load target theme's conf.d files
|
||||
for conf in {$OMF_CONFIG,$OMF_PATH}/themes/$target_theme/conf.d/*.fish
|
||||
source $conf
|
||||
end
|
||||
|
||||
# Persist the changes
|
||||
echo "$target_theme" > "$OMF_CONFIG/theme"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user