#!/usr/bin/env bash # This script aims to reduce the amount of time you have to spend in the # GCP console by allowing you to search through projects and select one # to make active. Must have both gcloud and fzf installed. You can copy # this script into path and adjust the script name and even remove `.sh` # because of the shebang at the top. gcloud projects list | \ awk '{print $1, "\t", $2}' | \ tail -n+2 | \ fzf | \ cut -d' ' -f1 | \ xargs -I '{}' gcloud config set project {}