9b7602153f1666e917c96b174abbdd8accd3203d
- Author
- Michael Aquilina <michaelaquilina@gmail.com>
- Committer
- Michael Aquilina <michaelaquilina@gmail.com>
- Date
Diff
1diff --git a/autoswitch_virtualenv.plugin.zsh b/autoswitch_virtualenv.plugin.zsh
2index 7c6551d9608f6fa7d83edd1d06685a63038718b3..2bb27ee329587d4128c163198fc467a74cab5801 100644
3--- a/autoswitch_virtualenv.plugin.zsh
4+++ b/autoswitch_virtualenv.plugin.zsh
5@@ -3,7 +3,7 @@ precmd() { check_venv }
6
7 function maybeworkon() {
8 if [ "$1" != "$(basename $VIRTUAL_ENV)" ]; then
9- printf "Switching virtualenv: $1 "
10+ printf "Switching virtualenv: %s " $1
11 workon "$1"
12 # For some reason python --version writes to stderr
13 printf "[%s]\n" "$(python --version 2>&1)"
14@@ -16,7 +16,7 @@ function check_venv()
15 if [ "$PWD" != "$MYOLDPWD" ]; then
16 MYOLDPWD="$PWD"
17 if [[ -f ".venv" ]]; then
18- maybeworkon `cat .venv`
19+ maybeworkon "$(cat .venv)"
20 else
21 maybeworkon default3
22 fi