19 lines
746 B
Plaintext
19 lines
746 B
Plaintext
#compdef gitclone
|
|
_arguments '-hub[GitHub]:hub:->hub' '-lab[Gitlab]:GitLab:->lab'
|
|
case "$state" in
|
|
hub) compadd $(curl -s https://api.github.com/users/xerus2000/repos?per_page=100 | grep '"name"' | grep -v ' ' | cut -d'"' -f4);;
|
|
lab) _values -s , 'flags' a b c d e;;
|
|
esac
|
|
|
|
cur=$words[$CURRENT-1]
|
|
unset 'words[-1]'
|
|
case $cur in
|
|
-p) compadd {13060..13069};;
|
|
*)
|
|
case $PREFIX in
|
|
-*) compadd -- -p -g -min -v -vv -nodocker;;
|
|
*) compadd $(find $projects_dir/softwarechallenge2018/clients -name "*.jar" | sed "s|.*Jumper-||" | sed "s|.jar||" | while read in; do for word in $words; do [ "$in" = "$word" ] && continue 2; done; echo $in; done)
|
|
compadd -- -p -g -min -v -vv -nodocker;;
|
|
esac
|
|
esac
|