changeset 931 | 0110114150ad |
child 935 | 79dd24c983f5 |
930:e867bffa536e | 931:0110114150ad |
---|---|
1 alias gssh='gcloud compute ssh' |
|
2 |
|
3 _gssh() { |
|
4 local cur=${COMP_WORDS[COMP_CWORD]} |
|
5 [[ "$cur" = -* ]] && return 0 |
|
6 local hosts=$(gcloud compute instances list --format='value(name)') |
|
7 COMPREPLY=( $(compgen -W "$hosts" -- "$cur") ) |
|
8 return 0 |
|
9 } |
|
10 |
|
11 complete -F _gssh gssh |