2012-07-30 02:42:37 +08:00
|
|
|
# Set fish_custom to the path where your custom config files
|
2015-01-07 13:00:00 +08:00
|
|
|
# and plugins exist, or use the default custom instead.
|
2012-07-30 02:42:37 +08:00
|
|
|
if not set -q fish_custom
|
2015-01-07 13:00:00 +08:00
|
|
|
set -g fish_custom $fish_path/custom
|
2012-07-25 12:07:27 +08:00
|
|
|
end
|
|
|
|
|
2015-01-07 13:00:00 +08:00
|
|
|
# Extract user defined functions from path and prepend later to
|
|
|
|
# avoid collisions with oh-my-fish internal functions and allow
|
|
|
|
# users to override/customize plugins, themes, etc.
|
2012-07-25 08:16:18 +08:00
|
|
|
set user_function_path $fish_function_path[1]
|
|
|
|
set -e fish_function_path[1]
|
|
|
|
|
2015-01-07 13:00:00 +08:00
|
|
|
# Add functions defined in oh-my-fish/functions to path.
|
2013-11-01 04:33:26 +08:00
|
|
|
if not contains $fish_path/functions/ $fish_function_path
|
2013-11-20 16:06:31 +08:00
|
|
|
set fish_function_path $fish_path/functions/ $fish_function_path
|
2013-11-01 04:33:26 +08:00
|
|
|
end
|
2012-07-24 11:59:50 +08:00
|
|
|
|
2015-01-07 13:00:00 +08:00
|
|
|
# Add required plugins, completions and themes. Imported commands can be
|
|
|
|
# customized via the $fish_path/custom directory. To customize a theme,
|
|
|
|
# create a directory under $fish_path/custom/themes with the same name
|
|
|
|
# as the theme. Use the same approach for plugins, etc.
|
|
|
|
import plugins/$fish_plugins themes/$fish_theme
|
2012-07-25 08:16:18 +08:00
|
|
|
|
2015-01-07 13:00:00 +08:00
|
|
|
# Prepend all user custom paths to the fish path and source load files.
|
|
|
|
for custom_file in $fish_custom/**
|
|
|
|
_prepend_path $custom_file -d fish_function_path
|
|
|
|
switch $custom_file
|
|
|
|
case \*.load
|
|
|
|
. $custom_file
|
|
|
|
end
|
2012-07-25 12:07:27 +08:00
|
|
|
end
|
|
|
|
|
2015-01-07 13:00:00 +08:00
|
|
|
# Prepend extracted user functions so they have the highest priority.
|
2012-07-25 08:16:18 +08:00
|
|
|
set fish_function_path $user_function_path $fish_function_path
|