summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2023-08-02 21:33:57 +0300
committerDirk-Jan C. Binnema <djcb@djcbsoftware.nl>2023-08-02 21:33:57 +0300
commit5866a4e4ed9f618435fbf35a98d5269091a1c499 (patch)
treeae8adda369accc511b71aecd5ab0e7109c6f6a66
parentc36d30bec25936dd3a6d595d53d6d77c0f1037a8 (diff)
mu-options: expand option file paths
Fixes #2528
-rw-r--r--mu/mu-options.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/mu/mu-options.cc b/mu/mu-options.cc
index 7c33b07..533bfb9 100644
--- a/mu/mu-options.cc
+++ b/mu/mu-options.cc
@@ -236,7 +236,8 @@ sub_extract(CLI::App& sub, Options& opts)
sub.add_option("--target-dir", opts.extract.targetdir,
"Target directory for saving")
->type_name("<dir>")
- ->default_str("<current>")->default_val(".");
+ ->default_str("<current>")->default_val(".")
+ ->transform(ExpandPath, "expand path");
sub.add_option("message", opts.extract.message,
"Path to message file")->required()
->type_name("<message-path>");
@@ -339,7 +340,8 @@ sub_find(CLI::App& sub, Options& opts)
"Clear old links first");
sub.add_option("--linksdir", opts.find.linksdir,
"Use bookmarked query")
- ->type_name("<dir>");
+ ->type_name("<dir>")
+ ->transform(ExpandPath, "expand path");
sub.add_option("--summary-len", opts.find.summary_len,
"Use up to so many lines for the summary")
@@ -384,7 +386,8 @@ sub_init(CLI::App& sub, Options& opts)
{
sub.add_option("--maildir,-m", opts.init.maildir,
"Top of the maildir")
- ->type_name("<maildir>");
+ ->type_name("<maildir>")
+ ->transform(ExpandPath, "expand path");
sub.add_option("--my-address", opts.init.my_addresses,
"Personal e-mail addresses")
->type_name("<address>");
@@ -700,7 +703,8 @@ There is NO WARRANTY, to the extent permitted by law.
sub->add_option("--muhome",
opts.muhome, "Specify alternative mu directory")
->envname("MUHOME")
- ->type_name("<dir>");
+ ->type_name("<dir>")
+ ->transform(ExpandPath, "expand path");
}
/* add scripts (if supported) as semi-subscommands as well */