dotfiles/.config/zsh/completion/_gitclone

7 lines
326 B
Plaintext
Raw Normal View History

2021-04-19 08:38:28 +00:00
#compdef gitclone gitremote
_arguments '-hub[GitHub]:hub:->github.com' '-lab[Gitlab]:GitLab:->gitlab.com'
case "$state" in
(github.com|'""') compadd $(curl -s https://api.github.com/users/xerus2000/repos?per_page=100 | grep '"name"' | grep -v ' ' | cut -d'"' -f4);;
(gitlab.com) _values -s , 'flags' a b c d e;;
esac