From aef952ec21bc07ace13f281c4743aacbddb28ac1 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Mon, 30 Mar 2015 00:26:08 +0200 Subject: [PATCH 1/2] Added AWS segment --- powerlevel9k.zsh-theme | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 870c503e..c03f3e41 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -270,6 +270,16 @@ prompt_rbenv() { fi } +# AWS Profile +# See http://docs.aws.amazon.com/cli/latest/userguide/installing.html +prompt_aws() { + local aws_profile=$AWS_DEFAULT_PROFILE + if [[ -n $aws_profile ]]; + then + $1_prompt_segment red white "AWS: $aws_profile" + fi +} + # Main prompt build_left_prompt() { if (( ${#POWERLEVEL9K_LEFT_PROMPT_ELEMENTS} == 0 )); then From 836abccb26108679fd820873425bd93e9a0371c4 Mon Sep 17 00:00:00 2001 From: Dominik Ritter Date: Mon, 30 Mar 2015 00:29:13 +0200 Subject: [PATCH 2/2] Added documentation. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 52ff2af4..c688c673 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ currently available are: * **rbenv** - Ruby environment information (if one is active). * **status** - The return code of the previous command, and status of background jobs. * **history** - The command number for the current line. +* **aws** - The current AWS profile, if you exported it with `export AWS_DEFAULT_PROFILE=` * **time** - System time. To specify which segments you want, just add the following variables to your