X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=completion%2Fnotmuch-completion.bash;h=59f1a3ea643123ccb2ef7fe2034dac28ae8f3dc2;hp=04324bbb3968222d84af224089a69c59e08a407b;hb=d5822224da58b93f1c3851a149c2f787acd9c401;hpb=db5189a3b9194da55e5c311ef3fc50a72c8a7009 diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash index 04324bbb..59f1a3ea 100644 --- a/completion/notmuch-completion.bash +++ b/completion/notmuch-completion.bash @@ -49,8 +49,19 @@ _notmuch_search_terms() from:*) COMPREPLY=( $(compgen -P "from:" -W "`_notmuch_user_emails`" -- ${cur##from:}) ) ;; + path:*) + local path=`notmuch config get database.path` + compopt -o nospace + COMPREPLY=( $(compgen -d "$path/${cur##path:}" | sed "s|^$path/||" ) ) + ;; + folder:*) + local path=`notmuch config get database.path` + compopt -o nospace + COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \ + sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) ) + ;; *) - local search_terms="from: to: subject: attachment: tag: id: thread: folder: date:" + local search_terms="from: to: subject: attachment: tag: id: thread: folder: path: date:" compopt -o nospace COMPREPLY=( $(compgen -W "${search_terms}" -- ${cur}) ) ;; @@ -208,7 +219,7 @@ _notmuch_new() case "${cur}" in -*) - local options="--no-hooks" + local options="--no-hooks --quiet" COMPREPLY=( $(compgen -W "${options}" -- ${cur}) ) ;; esac