Drop some unnecessary echos and greps.

This commit is contained in:
Ville Skyttä 2009-11-28 23:37:16 +02:00
parent a07b5c5ffd
commit 754ee95c1c
2 changed files with 4 additions and 4 deletions

View File

@ -224,7 +224,7 @@ _dpkg_source()
"-D") "-D")
# -D: override or add a .dsc field and value # -D: override or add a .dsc field and value
# if $cur doesn't contain a = yet, suggest variable names # if $cur doesn't contain a = yet, suggest variable names
if echo -- "$cur" | grep -q "="; then if [[ "$cur" == *=* ]]; then
# $cur contains a "=" # $cur contains a "="
COMPREPLY=() COMPREPLY=()
return 0 return 0

View File

@ -182,7 +182,7 @@ _postsuper()
-[dr]) -[dr])
len=${#cur} len=${#cur}
idx=0 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 sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* !].*$//' ); do
if [[ "$cur" == "${pval:0:$len}" ]]; then if [[ "$cur" == "${pval:0:$len}" ]]; then
COMPREPLY[$idx]=$pval COMPREPLY[$idx]=$pval
@ -194,7 +194,7 @@ _postsuper()
-h) -h)
len=${#cur} len=${#cur}
idx=0 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 sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* ].*$//; /!$/d' ); do
if [[ "$cur" == "${pval:0:$len}" ]]; then if [[ "$cur" == "${pval:0:$len}" ]]; then
COMPREPLY[$idx]=$pval COMPREPLY[$idx]=$pval
@ -206,7 +206,7 @@ _postsuper()
-H) -H)
len=${#cur} len=${#cur}
idx=0 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 sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//' ); do
if [[ "$cur" == "${pval:0:$len}" ]]; then if [[ "$cur" == "${pval:0:$len}" ]]; then
COMPREPLY[$idx]=$pval COMPREPLY[$idx]=$pval