From 11e9c4c9b5d4bb00cbb9fc8d7132dfc52b7ab19c Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 27 Jun 2026 09:46:39 +0200 Subject: feat: review named hints via -R regardless of version match Co-Authored-By: Claude Opus 4.8 --- mkhint | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/mkhint b/mkhint index b3a5e6b..8295c09 100755 --- a/mkhint +++ b/mkhint @@ -921,9 +921,15 @@ main() { esac done - # Collect remaining positional args as delete targets + # Collect remaining positional args. + # When -R is active and no other command set, they are review targets; + # otherwise they are delete targets. while [[ $# -gt 0 ]]; do - DELETE_HINT_FILES+=("$1") + if [[ -n "$RUN_REVIEW" && -z "$COMMAND" ]]; then + REVIEW_PKGS+=("$1") + else + DELETE_HINT_FILES+=("$1") + fi shift done @@ -951,9 +957,13 @@ main() { if [[ -n "$SHOW_LIST" || -n "$RUN_REVIEW" ]]; then [[ -n "$SHOW_LIST" ]] && list_hint_files if [[ -n "$RUN_REVIEW" ]]; then - # ensure MATCHED_PKGS is populated even when -l was not given - [[ -z "$SHOW_LIST" ]] && list_hint_files >/dev/null - review_hint_files + if [[ ${#REVIEW_PKGS[@]} -gt 0 ]]; then + review_hint_files "${REVIEW_PKGS[@]}" + else + # ensure MATCHED_PKGS is populated even when -l was not given + [[ -z "$SHOW_LIST" ]] && list_hint_files >/dev/null + review_hint_files + fi fi exit $? fi -- cgit v1.2.3