Commit

54c2884e8bbeadad99fad1631bdd8787f5c4ed51

l10n: AGENTS.md: zsh-safe review result cleanup

The review_one_batch() function cleans up stale po/review-result*.json
files before starting a new review. On zsh, an unmatched glob causes a
"no matches found" error and aborts the command, because NOMATCH is on
by default.

Fix by enabling null_glob locally when running under zsh. This leaves
bash and other POSIX shells unaffected, since $ZSH_VERSION is unset
there.

Only the cleanup step in review_one_batch() is changed; no other
behavior is affected.

Signed-off-by: Jiang Xin <worldhello.net@gmail.com>

Jiang Xin <worldhello.net@gmail.com> · 2026-09-18 01:47 UTC

Browse files
1 file changed, +6 −1
modified po/AGENTS.md
@@ -723,8 +723,13 @@ missing or empty (no batch left to review), or when step 1 finds
723 723 fi
724 724 if test ! -f "$PENDING" || test "$INPUT_JSON" -nt "$PENDING"
725 725 then
726 - rm -f "$BATCH_FILE" "$TODO" "$DONE"
726 + # zsh aborts on unmatched globs; allow empty expansion here.
727 + if test -n "$ZSH_VERSION"
728 + then
729 + setopt local_options null_glob
730 + fi
727 731 rm -f po/review-result*.json
732 + rm -f "$BATCH_FILE" "$TODO" "$DONE"
728 733 cp "$INPUT_JSON" "$PENDING"
729 734 fi
730 735