Skip to content

Commit

Permalink
Merge branch 'simonmichael:master' into web-register-nonempty-comma
Browse files Browse the repository at this point in the history
  • Loading branch information
thielema authored Sep 14, 2024
2 parents 2a446be + 6f10818 commit ee6740a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 39 deletions.
41 changes: 5 additions & 36 deletions .github/ISSUE_TEMPLATE/a-bug.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,9 @@ about: A weakness in the software, documentation, usability, or project
labels: A BUG
---

Thanks for reporting! Here are some tips (please delete them before submitting):
Thanks for reporting! Here are some tips (please remove this text before submitting):

- Have you checked the hledger manuals, and the right version ?
Eg for `hledger`: run `hledger help`, or go to
https://hledger.org/hledger.html and select your version at the top.

- If you're not sure this is a bug, or if some discussion would help,
contact us on chat or the mail list first:
https://hledger.org/support.html

- Not required, but any of these can help get issues resolved faster:
- A small reproducible example
- The output of hledger --version
- What platform you're on
- Links to any related docs that you found

- If you have the access level to set labels, consider adding
- Any topic labels that seem appropriate
- Severity and impact labels estimating

- How severe is this bug ?

- severity5: Data loss or privacy/security loss. A user would drop the product.
- severity4: Crash or bothersome regression or major usability or documentation issue. A user may look for an alternative product.
- severity3: Installability, packaging or new user experience issue. A potential user would fail to get started.
- severity2: Minor/moderate usability/doc issue. Easy to avoid or not a big deal.
- severity1: Cleanup/design/developer issue. Significant only to developers and design-minded users.

- Who is likely to be impacted by this bug ?

- impact5: All users.
- impact4: Most users.
- impact3: A minority of users.
- impact2: Only packagers or developers.
- impact1: Almost no one.

(These are now in the issue tracker as severityN and impactN labels, keep synced.)
- Have you checked (the right version of) the manual ? Eg https://hledger.org/hledger.html
- If some discussion would help, just ask in chat or mail list: https://hledger.org/support.html
- Any of these are very helpful: a small reproducible example, hledger --version output,
what platform you're running on, a link to to any relevant doc that you found.
23 changes: 20 additions & 3 deletions hledger/hledger.m4.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@ to be used when running hledger commands, in a config file. Here's a small examp

To use a config file, specify it with the `--conf` option.
Its options will be inserted near the start of your command line (so you can override them if needed).
Or, you can add a `hledger --conf` shebang line to a config file and execute it like a script.

Or, you can set up an automatic config file that is used whenever you run hledger.
This can be `hledger.conf` in the current directory or above,
Expand All @@ -551,16 +550,34 @@ To inspect the processing of config files, use `--debug` or `--debug=8`.
Here is another example config file you could start with:
<https://github.com/simonmichael/hledger/blob/master/hledger.conf.sample>

Tips:

Automatic config files are convenient, but have a cost: it's easy to change a report's behaviour,
or break scripts/applications which use hledger, in unintended ways that will surprise you later.
They change the nature of hledger somewhat, making it less transparent and predictable.
If you decide to use one, here are some tips:
If you decide to use one:

- Be conservative about what you put in it. Try to consider the effect on all your reports.
- Whenever a hledger command does not work as expected, try it again with `-n`.
- If that helps, you can run it with `--debug` to see how a config file affected it.

This feature has been added in hledger 1.40 and is considered *experimental*.
On unix machines, you can add a shebang line at the top of a config file, set executable permission on the file, and use it like a script.
Eg (some operating systems need the `-S`, some don't):
```
#!/usr/bin/env -S hledger --conf
```

You can put not only options, but also arguments in a config file.
This is probably more useful in special-purpose config files, not an automatic one.

There's an exception to this: a config file can't provide the command argument, currently
([#2231](https://github.com/simonmichael/hledger/issues/2231)).
If you need that, you can do it in the shebang line instead. Eg:
```
#!/usr/bin/env -S hledger balance --conf
```

The config file feature has been added in hledger 1.40 and is considered *experimental*.

# Output

Expand Down

0 comments on commit ee6740a

Please sign in to comment.