simonmichael / hledger

Robust, fast, intuitive plain text accounting tool with CLI, TUI and web interfaces.
https://hledger.org
GNU General Public License v3.0
2.85k stars 307 forks source link

dev: Runs shellcheck on hledger-simplebal #2160

Closed colindean closed 5 months ago

colindean commented 5 months ago

Shellcheck handled the variable fixups. The pipefail flag avoids another Shellcheck warning w.r.t. handling pipe failures. This script is so minimal that it's safe to simply fail the pipe entirely if the hledger command fails.

(Last shellcheck eval unless you're open to more and I find time. Doing these as I prep a PR to include them to be installed by default in the Homebrew package.)

simonmichael commented 5 months ago

Thanks, and thanks for getting more scripts packaged. I never thought of them as packageable, but you show that they are, at least on unix.

Often they are prototypes for things that might end up in the main tool. If they are worth packaging, perhaps that means it's getting to be time to do that..

colindean commented 5 months ago

That'd be awesome, esp. because I don't think the shell scripts are tested. -simplebal doesn't really need to be tested other than a "yep it works" but -bar has a lot of options.

simonmichael commented 5 months ago

Yes, really I created bin/ for "things which I don't have time to test and support as much as the core tools". Packaging them implies more support than that in my mind, so thank you for volunteering to test and support these scripts for brew users ! 😂 Note brew is on GNU/Linux too.

Let's see about RIIH (Rewrite It In Haskell) these two before very long.