summaryrefslogtreecommitdiffstats
path: root/completions/postsuper
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--completions/postsuper44
1 files changed, 14 insertions, 30 deletions
diff --git a/completions/postsuper b/completions/postsuper
index 559449a..d195ac7 100644
--- a/completions/postsuper
+++ b/completions/postsuper
@@ -1,56 +1,40 @@
# postsuper(1) completion -*- shell-script -*-
-_postsuper()
+_comp_cmd_postsuper()
{
- local cur prev words cword
- _init_completion || return
-
- local pval len
+ local cur prev words cword comp_args
+ _comp_initialize -- "$@" || return
case $prev in
-c)
- _filedir -d
+ _comp_compgen_filedir -d
return
;;
-[dr])
- len=${#cur}
- 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+=($pval)
- fi
- done
+ _comp_compgen_split -- "ALL $(mailq 2>/dev/null |
+ command sed -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* !].*$//')"
return
;;
-h)
- len=${#cur}
- 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+=($pval)
- fi
- done
+ _comp_compgen_split -- "ALL $(mailq 2>/dev/null |
+ command sed \
+ -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; s/[* ].*$//; /!$/d')"
return
;;
-H)
- len=${#cur}
- 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+=($pval)
- fi
- done
+ _comp_compgen_split -- "ALL $(mailq 2>/dev/null | command sed \
+ -e '1d; $d; /^[^0-9A-Z]/d; /^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//')"
return
;;
esac
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
return
fi
- COMPREPLY=($(compgen -W 'hold incoming active deferred' -- "$cur"))
+ _comp_compgen -- -W 'hold incoming active deferred'
} &&
- complete -F _postsuper postsuper
+ complete -F _comp_cmd_postsuper postsuper
# ex: filetype=sh