From 2b07301a4ff7273f4fc4377d68c9d2bb6dac74b7 Mon Sep 17 00:00:00 2001 From: Simon Michael Date: Tue, 3 Dec 2024 09:00:27 -1000 Subject: [PATCH] tools: just help: improvements --- Justfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Justfile b/Justfile index 046487c34..61a61d823 100644 --- a/Justfile +++ b/Justfile @@ -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