2012-07-25 12:07:27 +08:00
|
|
|
|
# Set FISH_CUSTOM to the path where your custom config files
|
|
|
|
|
# and plugins exists, or else we will use the default custom.
|
|
|
|
|
if not set -q FISH_CUSTOM
|
|
|
|
|
set -g FISH_CUSTOM $FISH/custom
|
|
|
|
|
end
|
|
|
|
|
|
2012-07-25 08:16:18 +08:00
|
|
|
|
# Extracting user's functions – will be added later.
|
|
|
|
|
set user_function_path $fish_function_path[1]
|
|
|
|
|
set -e fish_function_path[1]
|
|
|
|
|
|
2012-07-27 10:13:48 +08:00
|
|
|
|
# Add all functions
|
2012-07-24 11:59:50 +08:00
|
|
|
|
set fish_function_path $FISH/functions/ $fish_function_path
|
|
|
|
|
|
2012-07-27 10:13:48 +08:00
|
|
|
|
# Add all defined plugins
|
2012-07-24 07:33:02 +08:00
|
|
|
|
for plugin in $FISH_PLUGINS
|
2012-07-24 09:31:28 +08:00
|
|
|
|
set fish_function_path $FISH/plugins/$plugin $fish_function_path
|
2012-07-27 10:13:48 +08:00
|
|
|
|
|
|
|
|
|
# Add plugin completion
|
|
|
|
|
if test -e $FISH/plugins/$plugin/completions
|
|
|
|
|
set fish_complete_path $FISH/plugins/$plugin/completions $fish_complete_path
|
|
|
|
|
end
|
2012-07-24 07:33:02 +08:00
|
|
|
|
end
|
|
|
|
|
|
2012-07-27 10:13:48 +08:00
|
|
|
|
# Add user defined theme
|
2012-07-29 05:05:55 +08:00
|
|
|
|
set fish_function_path $FISH/themes/$FISH_THEME $fish_function_path
|
2012-07-25 08:16:18 +08:00
|
|
|
|
|
2012-07-27 10:13:48 +08:00
|
|
|
|
# Add all custom plugins
|
2012-07-25 12:07:27 +08:00
|
|
|
|
for plugin in $FISH_CUSTOM/plugins/*
|
|
|
|
|
set fish_function_path $plugin $fish_function_path
|
2012-07-27 10:13:48 +08:00
|
|
|
|
|
|
|
|
|
# Add plugin completion
|
|
|
|
|
if test -e $plugin/completions
|
|
|
|
|
set fish_complete_path $plugin/completions $fish_complete_path
|
|
|
|
|
end
|
2012-07-25 12:07:27 +08:00
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Source all files inside custom folder
|
|
|
|
|
for config_file in $FISH_CUSTOM/*.fish
|
|
|
|
|
. $config_file
|
|
|
|
|
end
|
|
|
|
|
|
2012-07-25 08:16:18 +08:00
|
|
|
|
# Re-adding user's functions so they have the highest priority
|
|
|
|
|
set fish_function_path $user_function_path $fish_function_path
|