diff options
Diffstat (limited to 'completions/postcat')
-rw-r--r-- | completions/postcat | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/completions/postcat b/completions/postcat index 69214354..22006233 100644 --- a/completions/postcat +++ b/completions/postcat @@ -13,7 +13,7 @@ _postcat() esac if [[ $cur == -* ]]; then - COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) ) + COMPREPLY=( $(compgen -W '$(_parse_usage "$1")' -- "$cur") ) return fi @@ -23,12 +23,10 @@ _postcat() done if [[ $qfile -eq 1 ]]; then local len=${#cur} pval - idx=0 - for pval in $( mailq 2>/dev/null | \ - command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//' ); do + for pval in $(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 |