aboutsummaryrefslogtreecommitdiff
path: root/completion/notmuch-completion.bash
diff options
context:
space:
mode:
authorCédric Hannotier <cedric.hannotier@ulb.be>2021-12-16 18:40:53 +0100
committerDavid Bremner <david@tethera.net>2022-01-03 08:07:38 -0400
commitd99b0d4dc8b9262373e2d0ae158dd8336fc28e41 (patch)
tree9f5e03549ab04fee477841461a487fa4a241632a /completion/notmuch-completion.bash
parentf9ffc5f433ca9c1cb1e9b9929e4f39e549910328 (diff)
completion: use mail_root for path completion in bash/zsh
Since mail store and database directory can be different, path and folder completions must use the directory given by database.mail_root, not by database.path.
Diffstat (limited to 'completion/notmuch-completion.bash')
-rw-r--r--completion/notmuch-completion.bash6
1 files changed, 3 insertions, 3 deletions
diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash
index 15425697..0022b54b 100644
--- a/completion/notmuch-completion.bash
+++ b/completion/notmuch-completion.bash
@@ -103,12 +103,12 @@ _notmuch_search_terms()
COMPREPLY=( $(compgen -P "from:" -W "`_notmuch_email ${cur}`" -- ${cur##from:}) )
;;
path:*)
- local path=`notmuch config get database.path`
+ local path=`notmuch config get database.mail_root`
compopt -o nospace
COMPREPLY=( $(compgen -d "$path/${cur##path:}" | sed "s|^$path/||" ) )
;;
folder:*)
- local path=`notmuch config get database.path`
+ local path=`notmuch config get database.mail_root`
compopt -o nospace
COMPREPLY=( $(compgen -d "$path/${cur##folder:}" | \
sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )
@@ -281,7 +281,7 @@ _notmuch_insert()
$split &&
case "${prev}" in
--folder)
- local path=`notmuch config get database.path`
+ local path=`notmuch config get database.mail_root`
compopt -o nospace
COMPREPLY=( $(compgen -d "$path/${cur}" | \
sed "s|^$path/||" | grep -v "\(^\|/\)\(cur\|new\|tmp\)$" ) )