aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-06-27 09:46:39 +0200
committerDanilo M. <danix@danix.xyz>2026-06-27 09:46:39 +0200
commit11e9c4c9b5d4bb00cbb9fc8d7132dfc52b7ab19c (patch)
tree2698cdd497a65ea73dbb7e1ef1a7eba345133086
parentb61e72d74cf6bb62092ef0ecebaf13520a1088e8 (diff)
downloadmkhintfile-11e9c4c9b5d4bb00cbb9fc8d7132dfc52b7ab19c.tar.gz
mkhintfile-11e9c4c9b5d4bb00cbb9fc8d7132dfc52b7ab19c.zip
feat: review named hints via -R <pkg...> regardless of version match
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
-rwxr-xr-xmkhint20
1 files 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