tools: just help: improvements

This commit is contained in:
Simon Michael 2024-12-03 09:00:27 -10:00
parent fd9c64a4ad
commit 2b07301a4f

View File

@ -62,12 +62,18 @@ WATCHEXEC := 'watchexec --timings'
# just := "just -f " + justfile()
# Use this justfile from within its directory, otherwise we must write {{ just }} everywhere.
#[group('HELPERS')] # XXX too noisy
# list this justfile's recipes, optionally filtered by REGEX
@help *REGEX:
if [[ '{{ REGEX }}' =~ '' ]]; then just -ul; else just -ul | rg -i '{{ REGEX }}'; true; fi
help *REGEX:
#!/usr/bin/env bash
if [[ '{{ REGEX }}' == '' ]]
then just -ul --color=always | sed -E 's/(^ +[A-Z_-]+ )/\n\1/'; echo
else just -ul --color=always | rg -i '{{ REGEX }}'; true
fi
alias h := help
#[group('HELPERS')]
# check this justfile for errors and non-standard format
@check:
just --fmt --unstable --check