Skip to content

Commit a46ccf1

Browse files
committed
feat(mailman): prefer list_lists in same dir as command
1 parent 9b443a9 commit a46ccf1

File tree

16 files changed

+48
-0
lines changed

16 files changed

+48
-0
lines changed

completions/add_members

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ _comp_cmd_add_members()
2222
_comp_compgen -- -W '--regular-members-file --digest-members-file
2323
--welcome-msg --admin-notify --help'
2424
else
25+
# Prefer `list_lists` in the same dir as command
26+
local pathcmd
27+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
2528
_comp_xfunc list_lists mailman_lists
2629
fi
2730

completions/arch

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ _comp_have_command mailmanctl &&
3232
done
3333
case $args in
3434
1)
35+
# Prefer `list_lists` in the same dir as command
36+
local pathcmd
37+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
3538
_comp_xfunc list_lists mailman_lists
3639
;;
3740
2)

completions/change_pw

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ _comp_cmd_change_pw()
77

88
case $prev in
99
-l | --listname)
10+
# Prefer `list_lists` in the same dir as command
11+
local pathcmd
12+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
1013
_comp_xfunc list_lists mailman_lists
1114
return
1215
;;

completions/check_db

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ _comp_cmd_check_db()
88
if [[ $cur == -* ]]; then
99
_comp_compgen -- -W '--all --verbose --help'
1010
else
11+
# Prefer `list_lists` in the same dir as command
12+
local pathcmd
13+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
1114
_comp_xfunc list_lists mailman_lists
1215
fi
1316

completions/clone_member

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ _comp_cmd_clone_member()
77

88
case $prev in
99
-l | --listname)
10+
# Prefer `list_lists` in the same dir as command
11+
local pathcmd
12+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
1013
_comp_xfunc list_lists mailman_lists
1114
return
1215
;;

completions/config_list

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ _comp_cmd_config_list()
1818
COMPREPLY=($(compgen -W '--inputfile --outputfile --checkonly
1919
--verbose --help' -- "$cur"))
2020
else
21+
# Prefer `list_lists` in the same dir as command
22+
local pathcmd
23+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
2124
_comp_xfunc list_lists mailman_lists
2225
fi
2326

completions/find_member

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ _comp_cmd_find_member()
77

88
case $prev in
99
-l | -x | --listname | --exclude)
10+
# Prefer `list_lists` in the same dir as command
11+
local pathcmd
12+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
1013
_comp_xfunc list_lists mailman_lists
1114
return
1215
;;

completions/inject

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ _comp_cmd_inject()
77

88
case $prev in
99
-l | --listname)
10+
# Prefer `list_lists` in the same dir as command
11+
local pathcmd
12+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
1013
_comp_xfunc list_lists mailman_lists
1114
return
1215
;;

completions/list_admins

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ _comp_cmd_list_admins()
88
if [[ $cur == -* ]]; then
99
_comp_compgen -- -W '--all-vhost --all --help'
1010
else
11+
# Prefer `list_lists` in the same dir as command
12+
local pathcmd
13+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
1114
_comp_xfunc list_lists mailman_lists
1215
fi
1316

completions/list_members

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ _comp_cmd_list_members()
2626
COMPREPLY=($(compgen -W '--output --regular --digest --nomail
2727
--fullnames --preserve --help' -- "$cur"))
2828
else
29+
# Prefer `list_lists` in the same dir as command
30+
local pathcmd
31+
pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH
2932
_comp_xfunc list_lists mailman_lists
3033
fi
3134

0 commit comments

Comments
 (0)