Skip to content

Commit 5a08a16

Browse files
committed
remove -e option from all calls to grep for better portability; fixes #85
1 parent d483798 commit 5a08a16

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

virtualenvwrapper.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ virtualenvwrapper_derive_workon_home() {
8080

8181
# If the path is relative, prefix it with $HOME
8282
# (note: for compatibility)
83-
if echo "$workon_home_dir" | (unset GREP_OPTIONS; \grep -e '^[^/~]' > /dev/null)
83+
if echo "$workon_home_dir" | (unset GREP_OPTIONS; \grep '^[^/~]' > /dev/null)
8484
then
8585
workon_home_dir="$HOME/$WORKON_HOME"
8686
fi
@@ -89,7 +89,7 @@ virtualenvwrapper_derive_workon_home() {
8989
# path might contain stuff to expand.
9090
# (it might be possible to do this in shell, but I don't know a
9191
# cross-shell-safe way of doing it -wolever)
92-
if echo "$workon_home_dir" | (unset GREP_OPTIONS; \egrep -e '([\$~]|//)' >/dev/null)
92+
if echo "$workon_home_dir" | (unset GREP_OPTIONS; \egrep '([\$~]|//)' >/dev/null)
9393
then
9494
# This will normalize the path by:
9595
# - Removing extra slashes (e.g., when TMPDIR ends in a slash)
@@ -571,7 +571,7 @@ cpvirtualenv() {
571571
echo "Please specify target virtualenv"
572572
return 1
573573
fi
574-
if echo "$WORKON_HOME" | (unset GREP_OPTIONS; \grep -e "/$" > /dev/null)
574+
if echo "$WORKON_HOME" | (unset GREP_OPTIONS; \grep "/$" > /dev/null)
575575
then
576576
typeset env_home="$WORKON_HOME"
577577
else

0 commit comments

Comments
 (0)