feat: 更新插入命令以支持尾部偏移标记和相关文档

This commit is contained in:
2025-10-31 15:29:12 +08:00
parent f0414ec32b
commit 843c51e347
9 changed files with 178 additions and 16 deletions

View File

@@ -48,7 +48,7 @@ All subcommands accept these persistent flags:
- `renamer replace <pattern...> <replacement>` — Replace multiple literal tokens in sequence. Shows duplicates and conflict warnings, then applies when `--yes` is present.
- `renamer remove <pattern...>` — Strip ordered substrings from names with empty-name protection and duplicate detection.
- `renamer extension <source-ext...> <target-ext>` — Normalize heterogeneous extensions to a single target while keeping a ledger entry for undo.
- `renamer insert <position> <text>` — Insert text at symbolic (`^`, `$`) or numeric offsets (positive or negative).
- `renamer insert <position> <text>` — Insert text at symbolic (`^`, `$`) offsets, count forward with numbers (`3` or `^3`), or backward with suffix tokens like `1$`.
- `renamer regex <pattern> <template>` — Rename via RE2 capture groups using placeholders like `@1`, `@2`, `@0`, or escape literal `@` as `@@`.
- `renamer undo` — Revert the most recent mutating command recorded in the ledger.