From e94e3fe6e1d30a856913992aafb35bc7dfa2912d Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Thu, 9 Jul 2026 17:22:55 +0200 Subject: feat: --info version-compare row; fix -i completion; release v1.2.6 --info/-i now prints a version-compare row between the header and the README: SBo .info version vs the hint's, greening the higher side (< / >), yellow on equal (=), '(no hint)' when no hint carries a version, skipped when the .info has no version. Header stays pinned, version row scrolls with the README. Completion: -i now completes package names (was flag-only); package-name completion for -n/-i drops the broken -maxdepth 2 .info scan for a param-expansion sweep of REPO_DIR/*/*/ dirs, ~7s -> ~60ms. Co-Authored-By: Claude Opus 4.8 --- CLAUDE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'CLAUDE.md') diff --git a/CLAUDE.md b/CLAUDE.md index f41a7bf..e83f633 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -176,7 +176,7 @@ When adding new features, add a corresponding test case to `tests/mkhint_test.sh `fetch_manifest`, `parse_manifest`, `match_dep_url`, `_url_version`, `reconcile_bundle_deps`. - `--delete` / `-d`: removes hint file and `.bak` if present. Accepts multiple package names. Exits 2 on first missing file. -- `--info` / `-i `: globs `REPO_DIR/*/pkg/` for the category, prints the green `category/program` header then the README, paged with sticky header (`less --header=1`) only when the README is taller than the terminal (inline when it fits or when piped), missing package exits 2, missing README prints `(no README)` and exits 0. Mutually exclusive with `-V`/`-f`/`-n`. Handler `show_info`. +- `--info` / `-i `: globs `REPO_DIR/*/pkg/` for the category, prints the green `category/program` header, then a version-compare row, then the README, paged with sticky header (`less --header=1`) only when the README is taller than the terminal (inline when it fits or when piped), missing package exits 2, missing README prints `(no README)` and exits 0. Mutually exclusive with `-V`/`-f`/`-n`. Handler `show_info`. The version row compares the SBo `.info` VERSION against the hint's (both via `grep "^VERSION" | cut -d '"' -f2` from `/.info` and `HINT_DIR/.hint`), normalized with `_normalize_version`: equal → whole row yellow with `=`; differ → `sort -V` greens the higher side with `<`/`>` pointing at it; hint absent/versionless → `SBo: x (no hint)`; `.info` without VERSION → row skipped. Header stays pinned (`--header=1`); the version row is body line 1 and scrolls with the README. - Downloads go to `/tmp/mkhint/download` (single shared temp file, deleted after md5 calculation). - Multiline `DOWNLOAD`/`DOWNLOAD_x86_64`: parsed via `parse_multiline_var` (awk). First URL always re-downloaded. Continuation URLs (2+) prompt user interactively — changed URLs re-downloaded, unchanged URLs keep existing md5. Written back via `perl -i` with `\` continuation format preserved. Shared logic in `update_checksums` → `_process_download_var`. -- cgit v1.2.3