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 --- mkhint.bash-completion | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'mkhint.bash-completion') diff --git a/mkhint.bash-completion b/mkhint.bash-completion index b24992b..031a707 100644 --- a/mkhint.bash-completion +++ b/mkhint.bash-completion @@ -31,11 +31,14 @@ _mkhintfile_completions() { fi case "$prev" in - --new|-n) - local -a words=() - while IFS= read -r f; do - words+=("$(basename "${f%.info}")") - done < <(find "$repo_dir" -mindepth 2 -maxdepth 2 -name "*.info" 2>/dev/null) + --new|-n|--info|-i) + # Packages live at REPO_DIR///; complete the pkg dir + # names. Strip the trailing slash and category prefix with param + # expansion (no per-dir basename fork — the repo has thousands). + local -a words=() d + for d in "$repo_dir"/*/*/; do + d="${d%/}"; words+=("${d##*/}") + done COMPREPLY=($(compgen -W "${words[*]}" -- "$cur")) ;; --hintfile|-f|--delete|-d|--check|-C) -- cgit v1.2.3