summaryrefslogtreecommitdiff
path: root/completions/postsuper
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.net.br>2019-08-07 09:17:13 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.net.br>2019-08-07 09:17:13 -0300
commit5732da2af736c40cf693354485446ab4867ecb4d (patch)
tree76d76cdfa16ca62d20fb109da13895ec64fff110 /completions/postsuper
parent9cd22d1df8f0f5b554858471c86faa9f37b8fed4 (diff)
downloadbash-completion-5732da2af736c40cf693354485446ab4867ecb4d.tar.gz
New upstream version 2.9upstream/2.9
Diffstat (limited to 'completions/postsuper')
-rw-r--r--completions/postsuper30
1 files changed, 12 insertions, 18 deletions
diff --git a/completions/postsuper b/completions/postsuper
index e69cbea0..509d2484 100644
--- a/completions/postsuper
+++ b/completions/postsuper
@@ -5,7 +5,7 @@ _postsuper()
local cur prev words cword
_init_completion || return
- local pval len idx
+ local pval len
case $prev in
-c)
@@ -14,36 +14,30 @@ _postsuper()
;;
-[dr])
len=${#cur}
- idx=0
- for pval in ALL $( mailq 2>/dev/null | \
- command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//' ); do
+ for pval in ALL $(mailq 2>/dev/null | \
+ command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//'); do
if [[ "$cur" == "${pval:0:$len}" ]]; then
- COMPREPLY[$idx]=$pval
- idx=$(($idx+1))
+ COMPREPLY+=( $pval )
fi
done
return
;;
-h)
len=${#cur}
- idx=0
- for pval in ALL $( mailq 2>/dev/null | \
- command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* ].*$//; /!$/d' ); do
+ for pval in ALL $(mailq 2>/dev/null | \
+ command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* ].*$//; /!$/d'); do
if [[ "$cur" == "${pval:0:$len}" ]]; then
- COMPREPLY[$idx]=$pval
- idx=$(($idx+1))
+ COMPREPLY+=( $pval )
fi
done
return
;;
-H)
len=${#cur}
- idx=0
- for pval in ALL $( mailq 2>/dev/null | \
- command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//' ); do
+ for pval in ALL $(mailq 2>/dev/null | \
+ command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//'); do
if [[ "$cur" == "${pval:0:$len}" ]]; then
- COMPREPLY[$idx]=$pval
- idx=$(($idx+1))
+ COMPREPLY+=( $pval )
fi
done
return
@@ -51,11 +45,11 @@ _postsuper()
esac
if [[ $cur == -* ]]; then
- COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") )
return
fi
- COMPREPLY=( $( compgen -W 'hold incoming active deferred' -- "$cur" ) )
+ COMPREPLY=( $(compgen -W 'hold incoming active deferred' -- "$cur") )
} &&
complete -F _postsuper postsuper