diff options
author | Gong Hao <gonghao@ghsky.com> | 2013-06-25 12:26:42 +0800 |
---|---|---|
committer | Gong Hao <gonghao@ghsky.com> | 2013-06-25 12:29:48 +0800 |
commit | ebfc9042ed2121c1d330a6767736fbf7bff2e369 (patch) | |
tree | 76a672100655dcba8f8e8e545ea0717f99baa996 /themes | |
parent | 78dba754d183804079474aa2b1390bd96cb67583 (diff) | |
download | zsh-ebfc9042ed2121c1d330a6767736fbf7bff2e369.tar.gz zsh-ebfc9042ed2121c1d330a6767736fbf7bff2e369.tar.bz2 zsh-ebfc9042ed2121c1d330a6767736fbf7bff2e369.zip |
add virtualenv prompt support for agnoster theme
Diffstat (limited to 'themes')
-rw-r--r-- | themes/agnoster.zsh-theme | 9 |
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 |