dotfiles_fish_server/functions/fish_enable_module.fish
2026-07-21 13:03:44 +05:30

21 lines
449 B
Fish

function fish_enable_module
set -l module $argv[1]
set -l dir $__fish_sysconf_dir/modules/$module
test -d $dir
or return 1
if test -d $dir/functions
set -ga fish_function_path $dir/functions
end
if test -d $dir/completions
set -ga fish_complete_path $dir/completions
end
if test -d $dir/conf.d
for file in (path sort $dir/conf.d/*.fish)
source $file
end
end
end