From 16888838b098f9464fe6f4ea16fe99212594b990 Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Thu, 8 Jan 2015 03:04:54 +0900 Subject: [PATCH] Fix import not getting passed the correct passed in `oh-my-fish.fish`. To import plugins or load themes: + import plugins/ + import plugins/{dpaste,cask} themes/bobthefish Note: Plugins/Themes can be in either `custom/plugins`, `custom/themes` or `$fish_path/plugins/`, `$fish_path/themes/`. --- functions/_prepend_tree.fish | 4 ++-- functions/import.fish | 3 ++- oh-my-fish.fish | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/functions/_prepend_tree.fish b/functions/_prepend_tree.fish index 916d996..fc6d177 100644 --- a/functions/_prepend_tree.fish +++ b/functions/_prepend_tree.fish @@ -91,8 +91,8 @@ function _prepend_tree -d "Add a dependency tree to the Fish path." # Traverse $path and $subs prepending only directories with matches. for dir in $path $subs - # Use head to retrieve at least one match. Ignore errors for non - # existing directories + # Use head to retrieve at least one match. Skip not found errors + # for directories that do not exist. if [ -z (find "$dir" $glob -maxdepth 1 ^/dev/null | head -1) ] continue end diff --git a/functions/import.fish b/functions/import.fish index 46454ee..d8118f9 100644 --- a/functions/import.fish +++ b/functions/import.fish @@ -15,7 +15,8 @@ # in ~/.config/fish/config.fish # # EXAMPLES -# import dpaste cask themes/bobthefish +# import plugins/ +# import plugins/{dpaste,cask} themes/bobthefish # # AUTHORS # Jorge Bucaran diff --git a/oh-my-fish.fish b/oh-my-fish.fish index 16b6e2f..fdd0e48 100644 --- a/oh-my-fish.fish +++ b/oh-my-fish.fish @@ -20,7 +20,7 @@ end # a directory under $fish_path/custom/themes with the same name as # the theme and override any functions/variables there. Rinse and # repeat for plugins. -import $fish_plugins themes/$fish_theme +import plugins/$fish_plugins themes/$fish_theme # Source all files inside custom directory. for load in $fish_custom/*.load