From 82404952ed5f7ac56d32cd47323b52ddbd27c142 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Fri, 5 Feb 2016 18:06:49 -0800 Subject: [PATCH] doc: manual: mention LEDGER_FILE env var gotcha --- hledger/hledger.1.md | 4 +++- site/manual.md | 13 ++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/hledger/hledger.1.md b/hledger/hledger.1.md index 1b0815b96..2b406b43a 100644 --- a/hledger/hledger.1.md +++ b/hledger/hledger.1.md @@ -29,7 +29,9 @@ format. Additionally, hledger lists other hledger-\* executables found in the user’s \$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 diff --git a/site/manual.md b/site/manual.md index 7ea7d20bb..e5a5f38cf 100644 --- a/site/manual.md +++ b/site/manual.md @@ -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