[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 .Sh ENVIRONMENT
Every option to Every option to
.Nm .Nm
may be set using an environment variable. If may be set using an environment variable if the option has a long name.
an option has a long name, for example For example setting the environment variable
.Fl \-account , .Ev LEDGER_DATE_FORMAT="%d.%m.%Y'
setting the environment variable will have the same effect as specifying
.Ev LEDGER_ACCOUNT .Fl \-date-format Ar '%d.%m.%Y'
will have the same effect as specifying that option on the command-line. on the command-line. Options on the command-line always take precedence over
Options on the command-line always take precedence over environment variable environment variable settings, however.
settings, however.
.Sh FILES .Sh FILES
.Bl -tag -width -indent .Bl -tag -width -indent
.It Pa ~/.ledgerrc .It Pa ~/.ledgerrc

View file

@ -7442,15 +7442,14 @@ BTC:USD}.
@node Environment variables, , Commodity reporting, Detailed Option Description @node Environment variables, , Commodity reporting, Detailed Option Description
@subsection Environment variables @subsection Environment variables
Every option to ledger may be set using an environment variable. If Every option to ledger may be set using an environment variable if the
an option has a long name, for example @option{--account}, setting the option has a long name. For example setting the environment variable
environment variable @env{LEDGER_ACCOUNT} will have the same @samp{@env{LEDGER_DATE_FORMAT}="%d.%m.%Y"} will have the same effect as specifying
effect as specifying that option on the command-line. Options on the @samp{@option{--date-format} '%d.%m.%Y'} on the command-line. Options on the
command-line always take precedence over environment variable command-line always take precedence over environment variable settings, however.
settings, however.
Note that you may also permanently specify option values by placing 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 @smallexample
--pager /bin/cat --pager /bin/cat