diff --git a/contrib/dpkg b/contrib/dpkg index 4cacd4ee..709efc25 100644 --- a/contrib/dpkg +++ b/contrib/dpkg @@ -224,7 +224,7 @@ _dpkg_source() "-D") # -D: override or add a .dsc field and value # if $cur doesn't contain a = yet, suggest variable names - if echo -- "$cur" | grep -q "="; then + if [[ "$cur" == *=* ]]; then # $cur contains a "=" COMPREPLY=() return 0 diff --git a/contrib/postfix b/contrib/postfix index e3712aa9..0dfd93b5 100644 --- a/contrib/postfix +++ b/contrib/postfix @@ -182,7 +182,7 @@ _postsuper() -[dr]) len=${#cur} idx=0 - for pval in $( echo ALL; mailq 2>/dev/null | \ + for pval in ALL $( mailq 2>/dev/null | \ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* !].*$//' ); do if [[ "$cur" == "${pval:0:$len}" ]]; then COMPREPLY[$idx]=$pval @@ -194,7 +194,7 @@ _postsuper() -h) len=${#cur} idx=0 - for pval in $( echo ALL; mailq 2>/dev/null | \ + for pval in ALL $( mailq 2>/dev/null | \ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* ].*$//; /!$/d' ); do if [[ "$cur" == "${pval:0:$len}" ]]; then COMPREPLY[$idx]=$pval @@ -206,7 +206,7 @@ _postsuper() -H) len=${#cur} idx=0 - for pval in $( echo ALL; mailq 2>/dev/null | \ + for pval in ALL $( mailq 2>/dev/null | \ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//' ); do if [[ "$cur" == "${pval:0:$len}" ]]; then COMPREPLY[$idx]=$pval