diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2015-01-29 16:23:48 +0100 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2015-01-29 16:23:48 +0100 |
commit | bc487be14bd1a79cbbedb9203921b357ced79ef7 (patch) | |
tree | 44bbd11b4700baa3d9c7385790ba150937b78e9b | |
parent | 2547096dc5d174db78af431480cb90067644282c (diff) | |
download | fork-ledger-bc487be14bd1a79cbbedb9203921b357ced79ef7.tar.gz fork-ledger-bc487be14bd1a79cbbedb9203921b357ced79ef7.tar.bz2 fork-ledger-bc487be14bd1a79cbbedb9203921b357ced79ef7.zip |
[doc] Improve example for environment variable options
[ci skip]
-rw-r--r-- | doc/ledger.1 | 15 | ||||
-rw-r--r-- | doc/ledger3.texi | 13 |
2 files changed, 13 insertions, 15 deletions
diff --git a/doc/ledger.1 b/doc/ledger.1 index 2374971b..67c24470 100644 --- a/doc/ledger.1 +++ b/doc/ledger.1 @@ -1291,14 +1291,13 @@ was parsed. See the section on .Sh ENVIRONMENT Every option to .Nm -may be set using an environment variable. If -an option has a long name, for example -.Fl \-account , -setting the environment variable -.Ev LEDGER_ACCOUNT -will have the same effect as specifying that option on the command-line. -Options on the command-line always take precedence over environment variable -settings, however. +may be set using an environment variable if the option has a long name. +For example setting the environment variable +.Ev LEDGER_DATE_FORMAT="%d.%m.%Y' +will have the same effect as specifying +.Fl \-date-format Ar '%d.%m.%Y' +on the command-line. Options on the command-line always take precedence over +environment variable settings, however. .Sh FILES .Bl -tag -width -indent .It Pa ~/.ledgerrc diff --git a/doc/ledger3.texi b/doc/ledger3.texi index e199181d..08d0d2db 100644 --- a/doc/ledger3.texi +++ b/doc/ledger3.texi @@ -7442,15 +7442,14 @@ BTC:USD}. @node Environment variables, , Commodity reporting, Detailed Option Description @subsection Environment variables -Every option to ledger may be set using an environment variable. If -an option has a long name, for example @option{--account}, setting the -environment variable @env{LEDGER_ACCOUNT} will have the same -effect as specifying that option on the command-line. Options on the -command-line always take precedence over environment variable -settings, however. +Every option to ledger may be set using an environment variable if the +option has a long name. For example setting the environment variable +@samp{@env{LEDGER_DATE_FORMAT}="%d.%m.%Y"} will have the same effect as specifying +@samp{@option{--date-format} '%d.%m.%Y'} on the command-line. Options on the +command-line always take precedence over environment variable settings, however. Note that you may also permanently specify option values by placing -option settings in the file @file{~/.ledgerrc}, for example: +option settings in the file @file{~/.ledgerrc} one option per line, for example: @smallexample --pager /bin/cat |