Skip to content

Commit 1a7bec7

Browse files
committed
replace deprecated egrep with grep -E
On newer verions of GNU grep, this warning pops up: egrep: warning: egrep is obsolescent; using grep -E Suppress the warning by doing what it asks. See the following for more detail: https://www.phoronix.com/news/GNU-Grep-3.8-Stop-egrep-fgrep
1 parent f481be3 commit 1a7bec7

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
@@ -177,7 +177,7 @@ function virtualenvwrapper_derive_workon_home {
177177
# path might contain stuff to expand.
178178
# (it might be possible to do this in shell, but I don't know a
179179
# cross-shell-safe way of doing it -wolever)
180-
if echo "$workon_home_dir" | (unset GREP_OPTIONS; command \egrep '([\$~]|//)' >/dev/null)
180+
if echo "$workon_home_dir" | (unset GREP_OPTIONS; command \grep -E '([\$~]|//)' >/dev/null)
181181
then
182182
# This will normalize the path by:
183183
# - Removing extra slashes (e.g., when TMPDIR ends in a slash)
@@ -599,7 +599,7 @@ function virtualenvwrapper_show_workon_options {
599599
| command \sed "s|/$VIRTUALENVWRAPPER_ENV_BIN_DIR/activate |/|g" \
600600
| command \tr "/" "\n" \
601601
| command \sed "/^\s*$/d" \
602-
| (unset GREP_OPTIONS; command \egrep -v '^\*$') 2>/dev/null
602+
| (unset GREP_OPTIONS; command \grep -E -v '^\*$') 2>/dev/null
603603
}
604604

605605
function _lsvirtualenv_usage {
@@ -1306,7 +1306,7 @@ function wipeenv {
13061306
virtualenvwrapper_verify_active_environment || return 1
13071307

13081308
typeset req_file="$(virtualenvwrapper_tempfile "requirements.txt")"
1309-
pip freeze | egrep -v '(distribute|wsgiref|appdirs|packaging|pyparsing|six)' > "$req_file"
1309+
pip freeze | grep -E -v '(distribute|wsgiref|appdirs|packaging|pyparsing|six)' > "$req_file"
13101310
if [ -n "$(cat "$req_file")" ]
13111311
then
13121312
echo "Uninstalling packages:"

0 commit comments

Comments
 (0)