diff options
author | Eric Wong <e@80x24.org> | 2021-02-02 22:11:41 -1000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-02-04 01:37:09 +0000 |
commit | 298751baed3ce7ae1549356152784b83220a31f0 (patch) | |
tree | 53aa742d4715ab52f3e08bd37ea47bc0b6460492 /contrib | |
parent | 36ee63d30ee076e6f6a8fdeabd50bf6757a3fdd6 (diff) | |
download | public-inbox-298751baed3ce7ae1549356152784b83220a31f0.tar.gz |
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
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/completion/lei-completion.bash | 6 |
1 files changed, 6 insertions, 0 deletions
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 |