[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 98d439ea462c6629b5cd403b0032217140b9c7c0

Ville Skyttä ville.skytta at iki.fi
Wed Dec 9 21:15:55 UTC 2009


The following commit has been merged in the master branch:
commit 98d439ea462c6629b5cd403b0032217140b9c7c0
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Wed Dec 9 22:52:00 2009 +0200

    Use grep -E instead of deprecated egrep.

diff --git a/contrib/_modules b/contrib/_modules
index b6f51b0..eb6da51 100644
--- a/contrib/_modules
+++ b/contrib/_modules
@@ -37,7 +37,7 @@ _module_avail ()
 {
     local modules="$( \
         module avail 2>&1 | \
-        egrep -v '^(-|$)' | \
+        grep -E -v '^(-|$)' | \
         xargs printf '%s\n' | sed -e 's/(default)//g' | sort )"
 
     compgen -W "$modules" -- $1
@@ -55,7 +55,7 @@ _module ()
     if [ $COMP_CWORD -eq 1 ] ; then
         # First parameter on line -- we expect it to be a mode selection
 
-        options="$( module help 2>&1 | egrep '^[[:space:]]*\+' | \
+        options="$( module help 2>&1 | grep -E '^[[:space:]]*\+' | \
                     awk '{print $2}' | sed -e 's/|/ /g' | sort )"
 
         COMPREPLY=( $(compgen -W "$options" -- "$cur") )
diff --git a/contrib/portupgrade b/contrib/portupgrade
index 65fa21b..91278eb 100644
--- a/contrib/portupgrade
+++ b/contrib/portupgrade
@@ -36,8 +36,8 @@ _portinstall()
 
     [[ "$prev" == -l || "$prev" == -L || "$prev" == -o ]] && return 0
 
-    COMPREPLY=( $( egrep "^$cur" < $indexfile | cut -d'|' -f1 ) )
-    COMPREPLY2=( $( egrep "^[^\|]+\|$portsdir$cur" < $indexfile | \
+    COMPREPLY=( $( grep -E "^$cur" < $indexfile | cut -d'|' -f1 ) )
+    COMPREPLY2=( $( grep -E "^[^\|]+\|$portsdir$cur" < $indexfile | \
         cut -d'|' -f2 ) )
     COMPREPLY2=( ${COMPREPLY2[@]#$portsdir} )
     COMPREPLY=( "${COMPREPLY[@]}" "${COMPREPLY2[@]}" )
diff --git a/contrib/rdesktop b/contrib/rdesktop
index 0081ada..d79ba4e 100644
--- a/contrib/rdesktop
+++ b/contrib/rdesktop
@@ -13,7 +13,7 @@ _rdesktop()
         -k)
             COMPREPLY=( $( command ls \
                 /usr/share/rdesktop/keymaps 2>/dev/null | \
-                egrep -v '(common|modifiers)' ) )
+                grep -E -v '(common|modifiers)' ) )
             COMPREPLY=( ${COMPREPLY[@]:-} $( command ls \
                 $HOME/.rdesktop/keymaps 2>/dev/null ) )
             COMPREPLY=( ${COMPREPLY[@]:-} $( command ls \

-- 
bash-completion



More information about the Bash-completion-commits mailing list