X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=cc5839247c6cd0a044db8def1c7ada02f23355c8;hp=1356c4a40515ffb86ffd222ec8b13a723877a166;hb=4cff5a9f98f3c7bdb58f8929dca83fa2d3af9c75;hpb=cd4814ecb35c63152aced04fcb82e5facf1463ca diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 1356c4a4..cc583924 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -86,7 +86,7 @@ _notmuch_search_terms() sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) ) ;; *) - local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date:" + local search_terms="from: to: subject: attachment: mimetype: tag: id: thread: folder: path: date: lastmod:" compopt -o nospace COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) ) ;; @@ -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