feat(functions): helper fish_reload, env per-dir, vv e stormcode

This commit is contained in:
2026-09-29 18:25:51 +02:00
parent a4f3f73dc1
commit d8e5342375
5 changed files with 134 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
function fish_reload --description 'Re-source fish init: config.fish, conf.d, functions and completions'
set -l fish_dir ~/.config/fish
# conf.d + config.fish
for file in $fish_dir/conf.d/*.fish
source $file
end
source $fish_dir/config.fish
# Erase autoloaded functions so they reload from disk on next use
for file in $fish_dir/functions/*.fish
functions -e (path change-extension '' (path basename $file)) 2>/dev/null
end
# Reload completions
for file in $fish_dir/completions/*.fish
complete -e -c (path change-extension '' (path basename $file)) 2>/dev/null
source $file
end
# Re-run key bindings
functions -q fish_user_key_bindings; and fish_user_key_bindings
set_color green
echo 'fish config reloaded'
set_color normal
end