Source init.fish on each plugin.

Unnecessarily sourcing a `$plugin_name.fish` is affecting the loading
time.
This commit is contained in:
Bruno Pinto 2015-09-30 20:28:57 +01:00
parent 2040eedc15
commit ceb31c143a

View File

@ -47,8 +47,12 @@ for path in $OMF_PATH/lib $OMF_PATH/lib/git {$OMF_PATH,$OMF_CONFIG}/pkg/* $theme
contains -- (basename $path) $OMF_IGNORE; and continue
autoload $path $path/completions
source $path/(basename $path).fish ^/dev/null
and emit init_(basename $path) $path
if source $path/init.fish ^/dev/null
else
source $path/(basename $path).fish ^/dev/null;
#and echo "Plugin '"(basename $path)"' has a deprecated structure. Run `omf update`."
end; and emit init_(basename $path) $path
end
autoload $OMF_CONFIG/functions