Gitweb:
https://git.exim.org/exim.git/commitdiff/1bca4f5fc7d74ba4ec1ced72eef8b806ae2be989
Commit: 1bca4f5fc7d74ba4ec1ced72eef8b806ae2be989
Parent: 71c158466dab1d452d450843e8c204a42200b7a8
Author: Phil Pennock <pdp@???>
AuthorDate: Tue Jul 31 15:54:17 2018 -0400
Committer: Phil Pennock <pdp@???>
CommitDate: Tue Jul 31 15:57:20 2018 -0400
Make -n work with macros too
Have `exim -n -bP macro FOO` just print the value of the macro `FOO`,
without the `name=` prefix.
This is the same handling as used for option values.
If the invoker asks for multiple macros in one invocation, with `-n`,
then that's their problem.
---
doc/doc-txt/ChangeLog | 2 ++
src/src/readconf.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index 5b8ada9..b0fbf91 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -85,6 +85,8 @@ JH/19 Reject MAIL FROM commands with SMTPUTF8 when the facility was not advertis
Previously thery were accepted, resulting in issues when attempting to
forward messages to a non-supporting MTA.
+PP/02 Let -n work with printing macros too, not just options.
+
Exim version 4.91
-----------------
diff --git a/src/src/readconf.c b/src/src/readconf.c
index fbf6d6b..bf024ef 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -2880,6 +2880,8 @@ else if (Ustrcmp(type, "macro") == 0)
{
if (names_only)
printf("%s\n", CS m->name);
+ else if (no_labels)
+ printf("%s\n", CS m->replacement);
else
printf("%s=%s\n", CS m->name, CS m->replacement);
if (name)