Fix: __fisher_plugin_walk was incorrectly traversing completions.

Due to how the completions/*.fish path was traversed
inside __fisher_plugin_walk, the plugin enable/disable
mechanism would fail to copy all completions other than
completions/<plugin>.fish into the config.
This commit is contained in:
Jorge Bucaran 2016-02-05 14:51:52 +09:00
parent be55d8eca5
commit 332f34564a
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -3,6 +3,8 @@ function __fisher_plugin_walk -a plugin path
set -l name (basename $file .fish)
set -l base $name.fish
echo (set_color red)$file(set_color normal) > /dev/stderr
switch $file
case \*/{fish_user_,}key_bindings.fish
printf "%s %s %s\n" --bind $file
@ -10,6 +12,9 @@ function __fisher_plugin_walk -a plugin path
case \?\*/uninstall.fish
printf "%s %s\n" --uninstall $file
case \?\*/completions/\*.fish
printf "%s %s %s\n" --source $file completions/$base
case \?\*/{conf.d,modules}/\?\* \?\*/\*config.fish \?\*/{before.,}init.fish \*/$plugin.load
switch "$base"
case \*$plugin\*
@ -19,9 +24,6 @@ function __fisher_plugin_walk -a plugin path
printf "%s %s %s\n" --source $file conf.d/$base
case \*/completions/$plugin.fish
printf "%s %s %s\n" --source $file completions/$base
case \*
printf "%s %s %s %s\n" --source $file functions/$base $name
end