21 lines
449 B
Fish
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 |