;doc:run, repl: more edits

This commit is contained in:
Simon Michael 2025-03-07 21:57:12 -10:00
parent e53191049f
commit 44a4b79fa4
2 changed files with 11 additions and 16 deletions

View File

@ -30,22 +30,18 @@ While it is running, the REPL remembers your command history, and you can naviga
- Keypad or Emacs navigation keys to edit the current command line
- UP/DOWN or control-P/control-N to step back/forward through history
- control-R to search for a past command
- TAB completes file paths.
- TAB to complete file paths.
The `commands` and `help` commands, and the command help flags (`CMD --tldr`, `CMD -h/--help`, `CMD --info`, `CMD --man`),
work in the usual way, and can be useful.
Generally `repl` command lines should feel much like the normal hledger CLI, but you may find differences.
`repl` is a little stricter;
eg it requires full command names or official abbreviations (as seen in the commands list).
The `commands` and `help` commands, and the command help flags
(`CMD --tldr`, `CMD -h/--help`, `CMD --info`, `CMD --man`), can be useful.
You can type control-C to cancel a long-running command (but only once; typing it a second time will exit the REPL).
And in most shells you can type control-Z to temporarily exit to the shell (and `fg` to bring it back to foreground and return to the REPL).
You may find some differences in behaviour between `repl` command lines and normal hledger command lines.
For example, in the REPL,
- the command name must be written first, options afterward
- full command names or official abbreviations (as in the command list) must be used
- options parsing with addon commands might be less flexible than the CLI
- the `stats` command gives false timings, currently
And in most shells you can type control-Z to temporarily exit to the shell (and then `fg` to return to the REPL).
### Examples

View File

@ -39,10 +39,9 @@ If that gives an error, use `#!/usr/bin/env -S hledger run`.
It's ok to use the `run` command recursively within a command script.
You may find some differences in behaviour between `run` command lines and normal hledger command lines.
For example, with `run`,
- the command name must be written first, options afterward
- full command names or official abbreviations (as in the command list) must be used
`run` is a little stricter;
eg it requires full command names or official abbreviations (as seen in the commands list),
and command options must be written after the command name.
### Examples