]> rtime.felk.cvut.cz Git - notmuch.git/commitdiff
completion: clean up top level completion
authorJani Nikula <jani@nikula.org>
Sat, 17 Oct 2015 16:30:03 +0000 (19:30 +0300)
committerDavid Bremner <david@tethera.net>
Thu, 22 Oct 2015 00:29:53 +0000 (21:29 -0300)
Add note about missing features.

completion/notmuch-completion.bash

index 1356c4a40515ffb86ffd222ec8b13a723877a166..f24d9ecd337ffb18ff55d1da5c22edd490b50941 100644 (file)
@@ -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