diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-09 17:22:55 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-09 17:22:55 +0200 |
| commit | e94e3fe6e1d30a856913992aafb35bc7dfa2912d (patch) | |
| tree | fc39d885612d6941e7f4d261ec088840c95367fe /CLAUDE.md | |
| parent | d74e9388d7d0581758d7aebe699e65c45f7bafb0 (diff) | |
| download | mkhintfile-e94e3fe6e1d30a856913992aafb35bc7dfa2912d.tar.gz mkhintfile-e94e3fe6e1d30a856913992aafb35bc7dfa2912d.zip | |
feat: --info version-compare row; fix -i completion; release v1.2.6v1.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 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 <pkg>`: 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 <pkg>`: 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 `<dir>/<pkg>.info` and `HINT_DIR/<pkg>.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`. |
