[doc] Improve example for environment variable options
[ci skip]
This commit is contained in:
parent
2547096dc5
commit
bc487be14b
2 changed files with 13 additions and 15 deletions
15
doc/ledger.1
15
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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue