Skip to content

Instantly share code, notes, and snippets.

@mcfedr
mcfedr / bash_prompt.sh
Created July 23, 2019 12:41
Bash prompt including current AWS profile, gcloud context, k8s context+namespace
# prompt
__aws_ps1() {
local printf_format="$1"
local profile="${AWS_PROFILE:-ekreative}"
if [ "$profile" != "ekreative" ]; then
printf -- "$printf_format" "${AWS_PROFILE:-ekreative}"
fi
}
__gcloud_ps1() {