Created
          October 2, 2020 10:20 
        
      - 
      
- 
        Save briandeheus/f52bc9aad9973260f1df2ad6d3d15a42 to your computer and use it in GitHub Desktop. 
Revisions
- 
        briandeheus renamed this gist Oct 2, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewingFile renamed without changes.
- 
        briandeheus created this gist Oct 2, 2020 .There are no files selected for viewingThis file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,28 @@ _get_gcp_accounts() { res=$(gcloud auth list --format="value(account)") for i in $res; do COMPREPLY+=("$i") done } _get_gcp_projects() { res=$(gcloud projects list --format="value(projectId)") for i in $res; do COMPREPLY+=("$i") done } googlesu() { gcloud config set account "$1" } googlesp() { gcloud config set project "$1" } complete -o default -F _get_gcp_accounts googlesu complete -o default -F _get_gcp_projects googlesp