From 2fe6af26d737773e0a7cafa5902360ab1309c807 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 18 Dec 2020 05:05:09 +0000 Subject: lei: start working on bash completion Much work still needs to be done, but that goes for this entire project :P --- contrib/completion/lei-completion.bash | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 contrib/completion/lei-completion.bash (limited to 'contrib') diff --git a/contrib/completion/lei-completion.bash b/contrib/completion/lei-completion.bash new file mode 100644 index 00000000..67cdd3ed --- /dev/null +++ b/contrib/completion/lei-completion.bash @@ -0,0 +1,11 @@ +# Copyright (C) 2020 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() { + COMPREPLY=($(compgen -W "$(lei _complete ${COMP_WORDS[@]})" \ + -- "${COMP_WORDS[COMP_CWORD]}")) + return 0 +} +complete -o filenames -o bashdefault -F _lei lei -- cgit v1.2.3-24-ge0c7