projects
/
notmuch.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
516a1b3
)
completion: complete notmuch insert --folder to maildir folders only
author
Jani Nikula
<jani@nikula.org>
Thu, 1 Jan 2015 14:34:30 +0000
(16:34 +0200)
committer
David Bremner
<david@tethera.net>
Fri, 2 Jan 2015 15:51:00 +0000
(16:51 +0100)
The --folder option expects a folder relative from maildir root, so
complete like the folder: search term.
completion/notmuch-completion.bash
patch
|
blob
|
history
diff --git
a/completion/notmuch-completion.bash
b/completion/notmuch-completion.bash
index 386437333742cbc887d92a851d37a2a438d6b684..d58dc8bed60f3640529d0b06dd5e294308acbfae 100644
(file)
--- a/
completion/notmuch-completion.bash
+++ b/
completion/notmuch-completion.bash
@@
-188,7
+188,10
@@
_notmuch_insert()
$split &&
case "${prev}" in
--folder)
- _filedir
+ local path=`notmuch config get database.path`
+ compopt -o nospace
+ COMPREPLY=( $(compgen -d "$path/${cur}" | \
+ sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
return
;;
esac