Add checks to see if file exists before source.

Fixes #524.
This commit is contained in:
Harrison Heck 2015-08-27 22:54:36 -04:00 committed by Jorge Bucaran
parent e7abc74939
commit 7d47220770

View File

@ -43,12 +43,13 @@ end
for path in $OMF_PATH/lib $OMF_PATH/lib/git $paths $theme $config
contains -- (basename $path) $ignore; and continue
autoload $path $path/completions
source $path/(basename $path).fish
source $path/(basename $path).fish ^/dev/null
and emit init_(basename $path) $path
end
autoload $OMF_CONFIG/functions
autoload $user_function_path
source {$OMF_PATH,$OMF_CONFIG}/events.fish
source $OMF_CONFIG/init.fish
for path in {$OMF_PATH,$OMF_CONFIG}/events.fish $OMF_CONFIG/init.fish
source "$path" ^/dev/null
end