X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=contrib%2Fcompletion%2Flei-completion.bash;h=fbda474c10bc43b975494fecd0c336476f06c6e0;hb=298751baed3ce7ae1549356152784b83220a31f0;hp=67cdd3edf42ff69915181579c72954f830b00c90;hpb=0c8106d44f317175e122744b43407bf067183175;p=public-inbox.git diff --git a/contrib/completion/lei-completion.bash b/contrib/completion/lei-completion.bash index 67cdd3ed..fbda474c 100644 --- a/contrib/completion/lei-completion.bash +++ b/contrib/completion/lei-completion.bash @@ -1,11 +1,17 @@ -# Copyright (C) 2020 all contributors +# Copyright (C) 2020-2021 all contributors # License: AGPL-3.0+ # preliminary bash completion support for lei (Local Email Interface) # Needs a lot of work, see `lei__complete' in lib/PublicInbox::LEI.pm _lei() { + case ${COMP_WORDS[@]} in + *' add-external http'*) + compopt -o nospace + ;; + *) compopt +o nospace ;; # the default + esac COMPREPLY=($(compgen -W "$(lei _complete ${COMP_WORDS[@]})" \ -- "${COMP_WORDS[COMP_CWORD]}")) return 0 } -complete -o filenames -o bashdefault -F _lei lei +complete -o default -o bashdefault -F _lei lei