feat: 更新扩展命令以支持大小写变体的处理和测试

This commit is contained in:
2025-10-31 14:49:24 +08:00
parent 67140ff8b3
commit f0414ec32b
7 changed files with 161 additions and 69 deletions

View File

@@ -87,6 +87,9 @@ renamer extension <source-ext...> <target-ext> [flags]
fails if any token omits the leading dot or repeats the target exactly.
- Source extensions are normalized case-insensitively; duplicates and no-op tokens are surfaced as
warnings in the preview rather than silently ignored.
- Case variants of the target extension (for example `.JPG` when targeting `.jpg`) remain untouched
unless you include them in the source list, ensuring casing changes happen only when explicitly
requested.
- Preview output lists every candidate with `changed`, `no change`, or `skipped` status so scripts
can detect conflicts before applying. Conflicting targets block apply and exit with a non-zero
code.