Drop some unnecessary echos and greps.
This commit is contained in:
parent
a07b5c5ffd
commit
754ee95c1c
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user