aboutsummaryrefslogtreecommitdiffstats
path: root/bash
diff options
context:
space:
mode:
authorjason2021-04-07 13:05:33 -0600
committerjason2021-04-07 13:05:33 -0600
commit54bf56fef53e179ad3fed210b4b0aebfcf994867 (patch)
treebce6c4c2d301afb559754c162211d33d54b6c425 /bash
parent8c4386df930569c2465ae6bf2fa6d8db3fb71a28 (diff)
downloaddotfiles-54bf56fef53e179ad3fed210b4b0aebfcf994867.tar.gz
dotfiles-54bf56fef53e179ad3fed210b4b0aebfcf994867.zip
fix PS1 for direnv and virtualenv
Diffstat (limited to 'bash')
-rw-r--r--bash/.bashrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/bash/.bashrc b/bash/.bashrc
index 849f400..33a6160 100644
--- a/bash/.bashrc
+++ b/bash/.bashrc
@@ -109,6 +109,13 @@ DIRENV=`which direnv`
109if [[ -x $DIRENV ]]; then 109if [[ -x $DIRENV ]]; then
110 eval "$(direnv hook bash)" 110 eval "$(direnv hook bash)"
111fi 111fi
112show_virtual_env() {
113 if [[ -n "$VIRTUAL_ENV" && -n "$DIRENV_DIR" ]]; then
114 echo "($(basename $VIRTUAL_ENV))"
115 fi
116}
117export -f show_virtual_env
118PS1='$(show_virtual_env)'$PS1
112 119
113# Enable warpdir (https://rc4.net/wd-rs/) 120# Enable warpdir (https://rc4.net/wd-rs/)
114WARPDIR=`which warpdir` 121WARPDIR=`which warpdir`