summaryrefslogtreecommitdiffstats
path: root/completions/clone_member
diff options
context:
space:
mode:
Diffstat (limited to 'completions/clone_member')
-rw-r--r--completions/clone_member19
1 files changed, 11 insertions, 8 deletions
diff --git a/completions/clone_member b/completions/clone_member
index a3ca2b3..01f87e6 100644
--- a/completions/clone_member
+++ b/completions/clone_member
@@ -1,25 +1,28 @@
# mailman clone_member completion -*- shell-script -*-
-_clone_member()
+_comp_cmd_clone_member()
{
- 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 | --listname)
- _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
return
;;
esac
- $split && return
+ [[ $was_split ]] && return
if [[ $cur == -* ]]; then
- COMPREPLY=($(compgen -W '--listname --remove --admin --quiet
- --nomodify --help' -- "$cur"))
+ _comp_compgen -- -W '--listname --remove --admin --quiet --nomodify
+ --help'
fi
} &&
- complete -F _clone_member clone_member
+ complete -F _comp_cmd_clone_member clone_member
# ex: filetype=sh