From 3485cbec67e2ee382a9e2a6f93b21406bc9c9d88 Mon Sep 17 00:00:00 2001 From: Bruno Pinto Date: Thu, 26 Jul 2012 23:13:48 -0300 Subject: [PATCH] loading plugins completions --- oh-my-fish.fish | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/oh-my-fish.fish b/oh-my-fish.fish index c6dbcdb..472d74b 100644 --- a/oh-my-fish.fish +++ b/oh-my-fish.fish @@ -8,20 +8,30 @@ end set user_function_path $fish_function_path[1] set -e fish_function_path[1] -# Add all functions to fish_function_path. +# Add all functions set fish_function_path $FISH/functions/ $fish_function_path -# Add all defined plugins to fish_function_path. +# Add all defined plugins for plugin in $FISH_PLUGINS set fish_function_path $FISH/plugins/$plugin $fish_function_path + + # Add plugin completion + if test -e $FISH/plugins/$plugin/completions + set fish_complete_path $FISH/plugins/$plugin/completions $fish_complete_path + end end -# Add user defined theme to fish_function_path. +# Add user defined theme set fish_function_path /Users/bpinto/.oh-my-fish/themes/$FISH_THEME $fish_function_path -# Add all custom plugins to fish_function_path +# Add all custom plugins for plugin in $FISH_CUSTOM/plugins/* set fish_function_path $plugin $fish_function_path + + # Add plugin completion + if test -e $plugin/completions + set fish_complete_path $plugin/completions $fish_complete_path + end end # Source all files inside custom folder