fisher/functions/__fisher_plugin_walk.fish
Jorge Bucaran 4b15cf374f
Ahoy! We are getting close to 0.8.0
* Move AUTHORS -> THANKS and remove automatic generation.

THANKS is more sensible than AUTHORS. CREDITS was second best.
Also, after perusing similar files in other projects I noticed
some entries lacking a valid email address and decided fow now
this file should be curated manually to make sure each entry
contains a useful link. This allows users who have contributed
to the project ways other than committing code to be added to
the list as well.

* Rename wait -> spin.

* Remove extra padding in links. (Cosmetic)

* Update to reflect API refactorings.

* Fix bug causing brackets to show up in description.

* Implement using spin function.

* __fisher_gist_to_name uses curl to query the GitHub API which will
return a JSON stream even if the Gist could not be found. So, it's
not possible to determine whether we failed or not using our spin
function and actually need to check the returned string to see if
it contains a valid name or not.

* Let git pull write errors to stderr.

* Use new internal __fisher_spin.

* Extract spin to independent / external module and tweak Makefile
to better integrate with new install process.
2016-02-14 13:17:47 +09:00

48 lines
1.4 KiB
Fish

function __fisher_plugin_walk -a plugin path
for file in $path/{*,{conf.d,modules}/*,functions/**}.{fish,load} $path/completions/*.fish
set -l name (basename $file .fish)
set -l base $name.fish
switch $file
case \*/{fish_user_,}key_bindings.fish
printf "%s %s %s\n" --bind $file
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\*
case \*
set base $plugin.$base
end
printf "%s %s %s\n" --source $file conf.d/$base
case \*
printf "%s %s %s %s\n" --source $file functions/$base $name
end
end
for prefix in functions scripts ""
for file in $path/$prefix/*.{py,rb,php,pl,awk,sed}
set -l base (basename $file)
if test -z "$prefix"
set prefix functions
end
printf "%s %s %s\n" -- $file $prefix/$base
end
end
for n in (seq 9)
for file in $path/man/man$n/*.$n
printf "%s %s %s\n" --man $file man/man$n/(basename $file)
end
end
end