From 2942cca0cd31b97d03e8f65780404736582b8a2b Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Sat, 26 Mar 2016 14:41:44 +0900 Subject: [PATCH] Fix load order during installation. Close #170. Now snippets can safely invoke functions defined in the plugin function directory. Thanks @orangecms. --- functions/__fisher_plugin_walk.fish | 2 +- test/fixtures/path-walk/foobar-path-walk | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/functions/__fisher_plugin_walk.fish b/functions/__fisher_plugin_walk.fish index c3d2807..d515004 100644 --- a/functions/__fisher_plugin_walk.fish +++ b/functions/__fisher_plugin_walk.fish @@ -1,7 +1,7 @@ function __fisher_plugin_walk -a plugin path debug "Walk %s" "$path" - for file in $path/{*,{conf.d,modules}/*,functions/**}.{fish,load} $path/completions/*.fish + for file in $path/{functions/**,*,{conf.d,modules}/*}.{fish,load} $path/completions/*.fish set -l name (basename $file .fish) set -l base $name.fish diff --git a/test/fixtures/path-walk/foobar-path-walk b/test/fixtures/path-walk/foobar-path-walk index e5358c6..051257c 100644 --- a/test/fixtures/path-walk/foobar-path-walk +++ b/test/fixtures/path-walk/foobar-path-walk @@ -1,3 +1,5 @@ +--source functions/foobar-baz.fish foobar-baz +--source functions/__foobar.fish __foobar --source conf.d/foobar.before.init.fish --source conf.d/foobar.config.fish --source functions/fish_greeting.fish fish_greeting @@ -10,17 +12,15 @@ --uninstall --source conf.d/foobar.conf.fish --source conf.d/foobar.mod.fish ---source functions/foobar-baz.fish foobar-baz ---source functions/__foobar.fish __foobar --source conf.d/foobar.load.fish --source completions/foobar.fish --- functions/foobar.py --- functions/foobar.rb --- functions/foobar.php --- functions/foobar.pl --- functions/foobar.awk --- functions/foobar.sed --- functions/quux.awk +-- conf.d/foobar.py +-- conf.d/foobar.rb +-- conf.d/foobar.php +-- conf.d/foobar.pl +-- conf.d/foobar.awk +-- conf.d/quux.awk +-- conf.d/foobar.sed --man man/man1/foobar.1 --man man/man2/foobar.2 --man man/man3/foobar.3