Commit e0785f89 authored by Bruno Pinto's avatar Bruno Pinto

loading all .load.fish files even inside plugins

parent ed76c2e5
...@@ -28,6 +28,19 @@ function _fish_add_completion ...@@ -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 ...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment