summaryrefslogtreecommitdiffstats
path: root/completions/newlist
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:03:18 +0000
commitf2621414ee5f2f601424c22f00e207903e3b6104 (patch)
tree56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/newlist
parentAdding debian version 1:2.11-8. (diff)
downloadbash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz
bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/newlist')
-rw-r--r--completions/newlist17
1 files changed, 10 insertions, 7 deletions
diff --git a/completions/newlist b/completions/newlist
index f1f6cf8..b4e6060 100644
--- a/completions/newlist
+++ b/completions/newlist
@@ -1,9 +1,9 @@
# mailman newlist completion -*- shell-script -*-
-_newlist()
+_comp_cmd_newlist()
{
- local cur prev words cword split
- _init_completion -s || return
+ local cur prev words cword was_split comp_args
+ _comp_initialize -s -- "$@" || return
case $prev in
-l | --language | -u | --urlhost | -e | --emailhost | --help)
@@ -11,15 +11,18 @@ _newlist()
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ _comp_compgen_help
[[ ${COMPREPLY-} == *= ]] && compopt -o nospace
else
- _xfunc list_lists _mailman_lists
+ # Prefer `list_lists` in the same dir as command
+ local pathcmd
+ pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
+ _comp_compgen -x list_lists mailman_lists
fi
} &&
- complete -F _newlist newlist
+ complete -F _comp_cmd_newlist newlist
# ex: filetype=sh