[PATCH v1 0/2] Interpret a directory path without a leading slash as relative to $HOME.

David Edmondson dme at dme.org
Sat Aug 25 04:57:54 PDT 2018


Being able to specify a database path that works well on multiple
machines, where $HOME is not always the same, seems generally
useful.

There was a previous attempt to support ~ in the configuration file
(id:1462722574-4176-1-git-send-email-bijan at chokoufe.com), but this
foundered on concerns about support for ~otheruser.

This patch attempts to avoid that problem by asserting that any
database lacking a leading / character is interpreted as being
relative to $HOME.

So in my case, I would set the path to Maildir:

[database]
path=Maildir

This would work in Linux (where my home directory is /home/dme) and on
macOS (where it is /Users/dme).

David Edmondson (2):
  test: Absolute and relative directory paths.
  notmuch: Database paths without a leading / are relative to $HOME

 notmuch-config.c    | 14 +++++++++++++-
 test/T030-config.sh | 10 ++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

-- 
2.11.0



More information about the notmuch mailing list