e7994f3a49f323495d7eadf2d280b6280e215789

Author
Pavle Portic <git@theedgeofrage.com>
Committer
Pavle Portic <git@theedgeofrage.com>
Date

Message

Add AWS profile to prompt

Diff

 1diff --git a/boban.zsh-theme b/boban.zsh-theme
 2index 3195b110e356d87dab11b8250ee0f51f2124672f..84da796cdc43060935257f6aa11cff5c3e641bf5 100644
 3--- a/boban.zsh-theme
 4+++ b/boban.zsh-theme
 5@@ -148,7 +148,15 @@ prompt_dir() {
 6 prompt_virtualenv() {
 7 	local virtualenv_path="$VIRTUAL_ENV"
 8 	if [[ -n $virtualenv_path && -n $VIRTUAL_ENV_DISABLE_PROMPT ]]; then
 9-		prompt_segment blue black "(`basename $virtualenv_path`)"
10+		prompt_segment blue black ""
11+	fi
12+}
13+
14+# AWS profile
15+prompt_aws() {
16+	local aws_profile="$AWS_PROFILE"
17+	if [[ -n $aws_profile ]]; then
18+		prompt_segment blue yellow "($aws_profile)"
19 	fi
20 }
21 
22@@ -188,6 +196,7 @@ build_prompt() {
23 	#RETVAL=$?
24 	#prompt_status
25 	prompt_virtualenv
26+	prompt_aws
27 	prompt_context
28 	prompt_dir
29 	# prompt_tf