doc: manual: mention LEDGER_FILE env var gotcha

This commit is contained in:
Simon Michael 2016-02-05 18:06:49 -08:00
parent 05572f4a08
commit 82404952ed
2 changed files with 13 additions and 4 deletions

View File

@ -29,7 +29,9 @@ format. Additionally, hledger lists other hledger-\* executables found
in the users \$PATH and can invoke them as subcommands.
The journal file is `~/.hledger.journal` by default, or another file path
specified by `$LEDGER_FILE`. You can also specify a file with `-f FILE`,
specified by `$LEDGER_FILE`.
(This should be a real environment variable, not a shell variable.)
You can also specify a file with `-f FILE`,
or standard input with `-f-`.
Transactions are dated movements of money between two (or more) named

View File

@ -86,7 +86,9 @@ $ hledger COMMAND [OPTIONS] [ARGS]
Most [commands](#commands) query or operate on a
[journal file](#journal), which by default is `.hledger.journal`
in your home directory. You can specify a different file with the `-f`
option or `LEDGER_FILE` environment variable, or standard input with `-f-`.
option or `LEDGER_FILE` environment variable
*([not a shell variable](#run-time-problems))*,
or standard input with `-f-`.
Options are similar across most commands, with some variations; use
`hledger COMMAND --help` for details.
@ -2614,8 +2616,13 @@ Here are some issues you might encounter when you run hledger
**Successfully installed, but "No command 'hledger' found"**
stack and cabal install binaries into a special directory, which
should be added to your PATH environment variable. On unix-like
systems, it is ~/.local/bin and ~/.cabal/bin respectively.
should be added to your PATH environment variable. Eg on unix-like
systems, that is ~/.local/bin and ~/.cabal/bin respectively.
**I set a custom LEDGER_FILE, but hledger is still using the default file**
`LEDGER_FILE` should be a real environment variable, not just a shell variable.
The command `env | grep LEDGER_FILE` should show it.
You may need to use `export`. Here's an [explanation](http://stackoverflow.com/a/7411509).
**"Illegal byte sequence" or "Invalid or incomplete multibyte or wide character" errors**
In order to handle non-ascii letters and symbols (like £), hledger needs