loading all .load.fish files even inside plugins

This commit is contained in:
Bruno Pinto 2012-07-29 01:14:44 -03:00
parent ed76c2e5c5
commit e0785f8949

View File

@ -28,6 +28,19 @@ function _fish_add_completion
end end
end end
function _fish_source_plugin_load_file
set -l plugin $argv[1]
set -l load_file_path "plugins/$plugin/$plugin.load.fish"
if test -e $FISH/$load_file_path
. $FISH/$load_file_path
end
if test -e $FISH_CUSTOM/$load_file_path
. $FISH_CUSTOM/$load_file_path
end
end
### ###
# Configuration # Configuration
### ###
@ -49,13 +62,14 @@ set fish_function_path $FISH/functions/ $fish_function_path
for plugin in $FISH_PLUGINS for plugin in $FISH_PLUGINS
_fish_add_plugin $plugin _fish_add_plugin $plugin
_fish_add_completion $plugin _fish_add_completion $plugin
_fish_source_plugin_load_file $plugin
end end
# Add user defined theme # Add user defined theme
set fish_function_path $FISH/themes/$FISH_THEME $fish_function_path set fish_function_path $FISH/themes/$FISH_THEME $fish_function_path
# Source all files inside custom folder # Source all files inside custom folder
for config_file in $FISH_CUSTOM/*.fish for config_file in $FISH_CUSTOM/*.load.fish
. $config_file . $config_file
end end