From ceb31c143ac604d551f6bb2830a6011291bb93ca Mon Sep 17 00:00:00 2001 From: Bruno Pinto Date: Wed, 30 Sep 2015 20:28:57 +0100 Subject: [PATCH] Source `init.fish` on each plugin. Unnecessarily sourcing a `$plugin_name.fish` is affecting the loading time. --- init.fish | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/init.fish b/init.fish index b7314b1..00f3ac1 100644 --- a/init.fish +++ b/init.fish @@ -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