Use grep -E instead of deprecated egrep.
This commit is contained in:
parent
04b7883f7d
commit
98d439ea46
@ -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") )
|
||||
|
@ -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[@]}" )
|
||||
|
@ -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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user