Merge pull request #483 from asdf-vm/update-fish-completions

Add update to Fish completions
This commit is contained in:
Daniel Perez 2019-03-14 21:45:12 +00:00 committed by GitHub
commit 741a731043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,6 +42,10 @@ function __fish_asdf_plugin_list_all
asdf plugin-list-all 2> /dev/null
end
# update
complete -f -c asdf -n '__fish_asdf_needs_command' -a update -d "Update asdf"
complete -f -c asdf -n '__fish_asdf_using_command update; and __fish_asdf_arg_number 2' -l "head" -d "Updates to master HEAD"
# plugin-add completion
complete -f -c asdf -n '__fish_asdf_needs_command' -a plugin-add -d "Add git repo as plugin"
complete -f -c asdf -n '__fish_asdf_using_command plugin-add; and __fish_asdf_arg_number 2' -a '(__fish_asdf_plugin_list_all | grep -v \'*\' | awk \'{ print $1 }\')'