[PATCH 3/3] completion: clean up top level completion
Jani Nikula
jani at nikula.org
Sat Oct 17 09:30:03 PDT 2015
Add note about missing features.
---
completion/notmuch-completion.bash | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
index 1356c4a40515..f24d9ecd337f 100644
--- a/completion/notmuch-completion.bash
+++ b/completion/notmuch-completion.bash
@@ -484,10 +484,15 @@ _notmuch()
if [ -z "${arg}" ]; then
# top level completion
- local top_options="--help --version"
case "${cur}" in
- -*) COMPREPLY=( $(compgen -W "${top_options}" -- ${cur}) ) ;;
- *) COMPREPLY=( $(compgen -W "${_notmuch_commands}" -- ${cur}) ) ;;
+ -*)
+ # XXX: handle ${_notmuch_shared_options} and --config=
+ local options="--help --version"
+ COMPREPLY=( $(compgen -W "${options}" -- ${cur}) )
+ ;;
+ *)
+ COMPREPLY=( $(compgen -W "${_notmuch_commands}" -- ${cur}) )
+ ;;
esac
elif [ "${arg}" = "help" ]; then
# handle help command specially due to _notmuch_commands usage
--
2.1.4
More information about the notmuch
mailing list