From 298751baed3ce7ae1549356152784b83220a31f0 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 2 Feb 2021 22:11:41 -1000 Subject: lei add-external: completion for existing URL basenames Given the presence of one external on a certain host or prefix path, it's logical other inboxes would share a common prefix. For bash users, attempt to complete that using the "-o nospace" option of bash --- contrib/completion/lei-completion.bash | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'contrib') diff --git a/contrib/completion/lei-completion.bash b/contrib/completion/lei-completion.bash index 0b82b109..fbda474c 100644 --- a/contrib/completion/lei-completion.bash +++ b/contrib/completion/lei-completion.bash @@ -4,6 +4,12 @@ # 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 -- cgit v1.2.3-24-ge0c7