diff options
| author | 2015-10-11 12:29:52 +0200 | |
|---|---|---|
| committer | 2015-10-11 12:29:52 +0200 | |
| commit | ddd8ae646f9b80184c81574b5d8c564a07722114 (patch) | |
| tree | 2ea4adf63f95a3af6c675360ff4a50623e7f096e | |
| parent | c0adda16193599584035ffdb756951ed33a79b12 (diff) | |
| download | dotfiles-ddd8ae646f9b80184c81574b5d8c564a07722114.tar.gz dotfiles-ddd8ae646f9b80184c81574b5d8c564a07722114.tar.bz2 dotfiles-ddd8ae646f9b80184c81574b5d8c564a07722114.zip | |
Updated bash an liquidprompt for python virtual environments
| -rwxr-xr-x | bash/.bashrc | 20 | ||||
| -rw-r--r-- | liquidprompt/.lp_ps1 | 2 |
2 files changed, 5 insertions, 17 deletions
diff --git a/bash/.bashrc b/bash/.bashrc index 73e42a9..8f5c09a 100755 --- a/bash/.bashrc +++ b/bash/.bashrc | |||
| @@ -146,22 +146,10 @@ if exists less; then | |||
| 146 | export PAGER="less" | 146 | export PAGER="less" |
| 147 | fi | 147 | fi |
| 148 | 148 | ||
| 149 | # Pip upgrade script | 149 | # Set the virtualenv parameters |
| 150 | if exists pip; then | 150 | if exists virtualenvwrapper.sh; then |
| 151 | pip() { | 151 | export WORKON_HOME=$HOME/.virtualenvs |
| 152 | if [[ "$1" == "upgrade" ]] || [[ "$1" == "update" ]]; then | 152 | source $use/bin/virtualenvwrapper.sh |
| 153 | outdated=$($usr/bin/pip list --outdated | awk '{ print $1 }') | ||
| 154 | for pkg in $outdated; do | ||
| 155 | $usr/bin/pip install $pkg --upgrade | ||
| 156 | done | ||
| 157 | |||
| 158 | if [[ -z "$outdated" ]]; then | ||
| 159 | echo "No updates found" | ||
| 160 | fi | ||
| 161 | else | ||
| 162 | $usr/bin/pip $@ | ||
| 163 | fi | ||
| 164 | } | ||
| 165 | fi | 153 | fi |
| 166 | 154 | ||
| 167 | # Start gnome-keyring-daemon | 155 | # Start gnome-keyring-daemon |
diff --git a/liquidprompt/.lp_ps1 b/liquidprompt/.lp_ps1 index 93987bb..c17806a 100644 --- a/liquidprompt/.lp_ps1 +++ b/liquidprompt/.lp_ps1 | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | # Remember that most features come with their corresponding colors, | 22 | # Remember that most features come with their corresponding colors, |
| 23 | # see the README. | 23 | # see the README. |
| 24 | 24 | ||
| 25 | LP_PS1="[\d][\t]\u on \h\n\w${LP_VCS} ${LP_MARK}" | 25 | LP_PS1="[\d][\t]\u on \h\n\w${LP_VENV}${LP_VCS} ${LP_MARK}" |
| 26 | 26 | ||
| 27 | LP_TITLE=$(_lp_title $PS1) | 27 | LP_TITLE=$(_lp_title $PS1) |
| 28 | PS1="${LP_TITLE}${PS1}" | 28 | PS1="${LP_TITLE}${PS1}" |
