diff options
author | Werner Koch <wk@gnupg.org> | 2020-04-03 22:49:04 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2020-04-03 22:49:04 +0200 |
commit | 98d11eff669c042d381ee4f18a42d32bcab256ef (patch) | |
tree | 5c431bd7937e91e99c0b2570e00ec2122c805eb9 /tests/etc | |
parent | ef07aedc70992742fcef92811345670777a3047b (diff) | |
download | libgpg-error-98d11eff669c042d381ee4f18a42d32bcab256ef.tar.gz |
core: Improve the echo and info meta commands of the arg parser
* src/argparse.c (handle_meta_echo): Substitue some vars.
(handle_meta_user): Factor some code out to ...
(assure_username): new.
--
Yeah, that is not really needed but might sometimes be helpful.
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'tests/etc')
-rw-r--r-- | tests/etc/t-argparse.conf | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/etc/t-argparse.conf b/tests/etc/t-argparse.conf index 4562c7c..863f74e 100644 --- a/tests/etc/t-argparse.conf +++ b/tests/etc/t-argparse.conf @@ -3,10 +3,17 @@ # Options applied to all user's config files #verbose -# The meta comman decho simply prints the argument. With a hash + +# The meta command echo simply prints the argument. With a hash # prefix it does not prepend the file name and line number. For # future compatibility do not use doallar signs. [-echo Begin global config] + +[-echo use $${user} to echo the current user (${user})] +[-echo use $${file} to echo the current file (${file})] +[-echo use $${line} to echo the current line (${line})] +[-echo use $${epoch} to echo a timestamp (${epoch})] + [verbose] [user joy] @@ -16,7 +23,7 @@ # info is an alias for echo but only executed if a user secion is active. # For future compatibility do not use percent or dollar signs. -[-info In user Joy] +[-info In user Joy but real user id ${user}] [-verbose] [+force] |