[doc] Improve example for environment variable options

[ci skip]
This commit is contained in:
Alexis Hildebrandt 2015-01-29 16:23:48 +01:00
parent 2547096dc5
commit bc487be14b
2 changed files with 13 additions and 15 deletions

View file

@ -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

View file

@ -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