diff --git a/justfile b/justfile index c299945..e88f2f3 100644 --- a/justfile +++ b/justfile @@ -18,6 +18,10 @@ export FZF_DEFAULT_OPTS := "--height 15 --cycle --bind 'ctrl-a:toggle-all' " + e # deal with concurrency export GIT := `command -v git-wait >/dev/null && echo "git-wait" || echo "git"` +# select the fastest jq available, xq > gojq > jq, but xq is missing many features, and gojq is missing some features +export JQ_GOJQ := `command -v "gojq" >/dev/null && echo gojq || echo "jq"` +export JQ_XQ := `command -v xq >/dev/null && echo "xq" || { command -v "gojq" >/dev/null && echo gojq || echo "jq" ;}` + # trigger a direnv reload when entering $SHELL export DIRENV_WATCHES := "" @@ -30,6 +34,7 @@ XARGS_NL := "-d'\\n' --no-run-if-empty" NIX_EVAL_OPTS := "--log-format raw --option warn-dirty false" # required programs: git nix nom gum fzf tee nix-update jq fd xe sd +# optional programs: gojq xq @_default: cd "$invokedir"; just "$(gum filter $(just --summary --unsorted | tr ' ' '\n' | grep -vxE 'commit|fixup|list|build'))" @@ -67,7 +72,7 @@ list-packages +$cut_args="-c1-": _packages_json #!/usr/bin/env -S bash -euo pipefail cachefile=/tmp/nixpkgs-packages.json.tsv if ! [[ -s "$cachefile" && "$cachefile" -nt packages.json ]]; then - jq "$cachefile" @@ -148,7 +153,7 @@ list-packages-by-maintainer *github_handles: _packages_json [[ "${#maintainers[@]}" -gt 0 ]] #grep