|
59 | 59 |
|
60 | 60 | # If the path is relative, prefix it with $HOME
|
61 | 61 | # (note: for compatibility)
|
62 |
| -if echo "$WORKON_HOME" | grep -e '^[^/~]' > /dev/null |
| 62 | +if echo "$WORKON_HOME" | (unset GREP_OPTIONS; grep -e '^[^/~]' > /dev/null) |
63 | 63 | then
|
64 | 64 | export WORKON_HOME="$HOME/$WORKON_HOME"
|
65 | 65 | fi
|
|
68 | 68 | # path might contain stuff to expand.
|
69 | 69 | # (it might be possible to do this in shell, but I don't know a
|
70 | 70 | # cross-shell-safe way of doing it -wolever)
|
71 |
| -if echo "$WORKON_HOME" | egrep -e "([$~]|//)" >/dev/null |
| 71 | +if echo "$WORKON_HOME" | (unset GREP_OPTIONS; egrep -e "([$~]|//)" >/dev/null) |
72 | 72 | then
|
73 | 73 | # This will normalize the path by:
|
74 | 74 | # - Removing extra slashes (e.g., when TMPDIR ends in a slash)
|
@@ -142,7 +142,7 @@ virtualenvwrapper_initialize () {
|
142 | 142 |
|
143 | 143 | # Verify that virtualenv is installed and visible
|
144 | 144 | virtualenvwrapper_verify_virtualenv () {
|
145 |
| - typeset venv=$(\which virtualenv | grep -v "not found") |
| 145 | + typeset venv=$(\which virtualenv | (unset GREP_OPTIONS; grep -v "not found")) |
146 | 146 | if [ "$venv" = "" ]
|
147 | 147 | then
|
148 | 148 | echo "ERROR: virtualenvwrapper could not find virtualenv in your path" >&2
|
@@ -226,7 +226,7 @@ virtualenvwrapper_show_workon_options () {
|
226 | 226 | # NOTE: DO NOT use ls here because colorized versions spew control characters
|
227 | 227 | # into the output list.
|
228 | 228 | # echo seems a little faster than find, even with -depth 3.
|
229 |
| - (cd "$WORKON_HOME"; for f in */bin/activate; do echo $f; done) 2>/dev/null | sed 's|^\./||' | sed 's|/bin/activate||' | sort | egrep -v '^\*$' |
| 229 | + (cd "$WORKON_HOME"; for f in */bin/activate; do echo $f; done) 2>/dev/null | sed 's|^\./||' | sed 's|/bin/activate||' | sort | (unset GREP_OPTIONS; egrep -v '^\*$') |
230 | 230 | # (cd "$WORKON_HOME"; find -L . -depth 3 -path '*/bin/activate') | sed 's|^\./||' | sed 's|/bin/activate||' | sort
|
231 | 231 | }
|
232 | 232 |
|
@@ -445,7 +445,7 @@ cpvirtualenv() {
|
445 | 445 | echo "Please specify target virtualenv"
|
446 | 446 | return 1
|
447 | 447 | fi
|
448 |
| - if echo "$WORKON_HOME" | grep -e "/$" > /dev/null |
| 448 | + if echo "$WORKON_HOME" | (unset GREP_OPTIONS; grep -e "/$" > /dev/null) |
449 | 449 | then
|
450 | 450 | typset env_home="$WORKON_HOME"
|
451 | 451 | else
|
|
0 commit comments