Command reference
ed shelf rename
Preview new names for selected shelf copies. Source files outside Shelf remain unchanged. Previewing saves a plan and does not rename files.
ed shelf rename <n...> [--mode number] [--text <text>] [--json]ed shelf rename 1 2 --mode number --text Trip- --start 1 --digits 3 --jsoned shelf rename 1 2 --mode date --text Photo- --date-format yyyy-MM-dded shelf rename 1 2 --mode replace --find draft --text final --ignore-caseNumbers come from ed shelf ls. Their argument order determines numbering unless
--order name or --order modified is supplied. Duplicate item numbers select the
file once. Up to 1,000 files can be planned in one command.
| Option | Default | Meaning |
|---|---|---|
--mode |
number |
number, date, replace, regex, wildcard, append, prepend, remove, insert, case |
--text |
empty | Sequence label, date label, replacement, or inserted text |
--find |
empty | Literal text, regular expression, or wildcard pattern |
--start, --digits |
1, 3 |
Starting number and minimum width, 1 to 12 digits |
--placement |
replace |
replace, prepend, or append for number and date |
--occurrence |
all |
first, last, or all for literal replacements |
--date-source |
current |
current, created, or modified |
--date-format |
yyyy-MM-dd |
Unicode date format in the local time zone |
--letter-case |
lower |
lower, upper, or title |
--offset, --count |
0, 1 |
Character position and removal count, measured in visible characters |
--order |
selected |
selected, name, or modified |
--reverse |
off | Reverse the chosen order |
--include-extension |
off | Transform the whole name instead of preserving the extension |
--ignore-case |
off | Ignore case when matching |
--json |
off | Emit the saved record |
Regular expressions use Foundation syntax and $1 capture replacements.
Wildcards match the entire stem with * and ?, and use literal replacement text.
No mode traverses directories. Date metadata belongs to the parked copy.
JSON contains plan.id, plan.createdAt, plan.rows with id, source,
destination, and optional issue, source identities, and state: "preview".
Dates use ISO 8601. A collision appears in issue; a successful preview command
can contain blocked rows. Nothing is applied until a separate apply command.
Shelf items whose names contain : can be renamed, but a new name cannot
contain / or :, and names Edith reserves for its own bookkeeping, such as
.rename-history, are refused.
In the notch tray, right-click a file and choose Rename, or use Rename All in the tray's more menu. The rename window previews as you type and offers Recent renames to undo an earlier batch.
Invalid arguments exit 2. Missing shelf items exit 3, and an empty shelf exits 4. Invalid patterns, missing source files, and unreadable storage return a failure. Collision matching conservatively ignores case and Unicode normalization even on a case-sensitive volume. Swaps and case-only changes are supported.