1 # Copyright (C) 2020-2021 all contributors <meta@public-inbox.org>
2 # License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
4 # preliminary bash completion support for lei (Local Email Interface)
5 # Needs a lot of work, see `lei__complete' in lib/PublicInbox::LEI.pm
7 case ${COMP_WORDS[@]} in
8 *' add-external h'* | *' --mirror h'*)
11 *) compopt +o nospace ;; # the default
13 COMPREPLY=($(compgen -W "$(lei _complete ${COMP_WORDS[@]})" \
14 -- "${COMP_WORDS[COMP_CWORD]}"))
17 complete -o default -o bashdefault -F _lei lei