Skip to content

Instantly share code, notes, and snippets.

@lucindo
Created February 4, 2016 03:45
Show Gist options
  • Save lucindo/85b8768384f5977aa11c to your computer and use it in GitHub Desktop.
Save lucindo/85b8768384f5977aa11c to your computer and use it in GitHub Desktop.
Showing virtualenv on Pure theme (bash it)
diff --git a/themes/pure/pure.theme.bash b/themes/pure/pure.theme.bash
index 9b145cc..c25c484 100644
--- a/themes/pure/pure.theme.bash
+++ b/themes/pure/pure.theme.bash
@@ -30,12 +30,13 @@ pure_prompt() {
ps_root="${red}\u${red}";
ps_root_mark="${red} # ${normal}"
ps_path="${yellow}\w${normal}";
+ ps_env="$(virtualenv_prompt)${normal}"
# make it work
case $(id -u) in
0) PS1="$ps_root@$ps_host$(scm_prompt):$ps_path$ps_root_mark"
;;
- *) PS1="$ps_user@$ps_host$(scm_prompt):$ps_path$ps_user_mark"
+ *) PS1="$ps_user@$ps_host$(scm_prompt):$ps_path$ps_env$ps_user_mark"
;;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment