aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2016-02-05 18:34:34 +0300
committerBen Hilburn <bhilburn@gmail.com>2016-02-05 18:34:34 +0300
commit65e9438210143496dde2972e3d967e1c7a949efb (patch)
treeb96754fecae241470a3e5f654ba2db0eb93f36ba
parent472fb6f674d315f372bc3480b2f1aba8d772a680 (diff)
parent45184839f36431c4b6c8bcc42f06cbb4a1ed3204 (diff)
Merge pull request #203 from dritter/beanstalk
Reworked the AWS-Beanstalk segment
-rw-r--r--CHANGELOG.md6
-rw-r--r--README.md1
-rw-r--r--functions/icons.zsh3
-rwxr-xr-xpowerlevel9k.zsh-theme9
4 files changed, 19 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 816a0dc0..ce0fe494 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,9 @@
+## v0.4.0
+
+### New segment `aws_eb_env` added
+
+This segment displays the current Elastic Beanstalk environment.
+
## v0.3.1
### `dir` changes
diff --git a/README.md b/README.md
index 800711de..567db77f 100644
--- a/README.md
+++ b/README.md
@@ -81,6 +81,7 @@ your `~/.zshrc`:
The segments that are currently available are:
* [aws](#aws) - The current AWS profile, if active.
+* **aws_eb_env** - The current Elastic Beanstalk Environment.
* [background_jobs](#background_jobs) - Indicator for background jobs.
* [battery](#battery) - Current battery status.
* [context](#context) - Your username and host.
diff --git a/functions/icons.zsh b/functions/icons.zsh
index aad62dc1..1eaef3d6 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -29,6 +29,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\UE801' # 
RUBY_ICON $'\UE847 ' # 
AWS_ICON $'\UE895' # 
+ AWS_EB_ICON $'\U1F331 ' # 🌱
BACKGROUND_JOBS_ICON $'\UE82F ' # 
TEST_ICON $'\UE891' # 
TODO_ICON $'\U2611' # ☑
@@ -82,6 +83,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\uF201' # 
RUBY_ICON $'\UF219 ' # 
AWS_ICON $'\UF296' # 
+ AWS_EB_ICON $'\U1F331 ' # 🌱
BACKGROUND_JOBS_ICON $'\UF013 ' # 
TEST_ICON $'\UF291' # 
TODO_ICON $'\U2611' # ☑
@@ -130,6 +132,7 @@ case $POWERLEVEL9K_MODE in
ROOT_ICON $'\u26A1' # ⚡
RUBY_ICON ''
AWS_ICON 'AWS:'
+ AWS_EB_ICON $'\U1F331 ' # 🌱
BACKGROUND_JOBS_ICON $'\u2699' # ⚙
TEST_ICON ''
TODO_ICON $'\U2611' # ☑
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 6f34b94c..f8e75b33 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -289,6 +289,15 @@ prompt_aws() {
fi
}
+# Current Elastic Beanstalk environment
+prompt_aws_eb_env() {
+ local eb_env=$(grep environment .elasticbeanstalk/config.yml 2> /dev/null | awk '{print $2}')
+
+ if [[ -n "$eb_env" ]]; then
+ "$1_prompt_segment" "$0" "$2" black green "$eb_env" 'AWS_EB_ICON'
+ fi
+}
+
# Segment to indicate background jobs with an icon.
set_default POWERLEVEL9K_BACKGROUND_JOBS_VERBOSE true
prompt_background_jobs() {