summaryrefslogtreecommitdiff
path: root/themes/agnoster.zsh-theme
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2013-06-25 09:06:31 -0700
committerRobby Russell <robby@planetargon.com>2013-06-25 09:06:31 -0700
commit84b9598e4e3d3509d11618b84de4db5057629cd2 (patch)
tree871929aa1df518b67f92559401b42054c53c897f /themes/agnoster.zsh-theme
parentc88121149a57c7935552ea1464f6c330f1282522 (diff)
parentebfc9042ed2121c1d330a6767736fbf7bff2e369 (diff)
downloadzsh-84b9598e4e3d3509d11618b84de4db5057629cd2.tar.gz
zsh-84b9598e4e3d3509d11618b84de4db5057629cd2.tar.bz2
zsh-84b9598e4e3d3509d11618b84de4db5057629cd2.zip
Merge pull request #1909 from gonghao/master
add virtualenv prompt support for agnoster theme
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r--themes/agnoster.zsh-theme9
1 files changed, 9 insertions, 0 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index e65293858..c7a59ad0d 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -134,6 +134,14 @@ prompt_dir() {
prompt_segment blue black '%~'
}
+# Virtualenv: current working virtualenv
+prompt_virtualenv() {
+ local virtualenv_path="$VIRTUAL_ENV"
+ if [[ -n $virtualenv_path ]]; then
+ prompt_segment blue black "(`basename $virtualenv_path`)"
+ fi
+}
+
# Status:
# - was there an error
# - am I root
@@ -152,6 +160,7 @@ prompt_status() {
build_prompt() {
RETVAL=$?
prompt_status
+ prompt_virtualenv
prompt_context
prompt_dir
prompt_git