feat(hashline): updated grammar and documentation for unified put and cut syntax
- Update Lark grammar to support the unified put, cut, move, and remove operations. - Update documentation and prompts to reflect canonical inclusive range separators and named register rules.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
### Changed
|
||||
|
||||
- Moved the display-reset default chord (`app.display.reset`) from `Ctrl+L` to `Alt+L` to make room for the live-mode toggle.
|
||||
- Updated the hashline edit tool, streaming preview, and plan-mode guidance for the unified `PUT`/`CUT` grammar, `.=` ranges, and named registers.
|
||||
|
||||
## [17.2.1] - 2026-07-30
|
||||
|
||||
|
||||
@@ -9,7 +9,16 @@
|
||||
### Added
|
||||
|
||||
- Added named register support (`@reg`) and span paste capabilities to clipboard operations
|
||||
- Added auto-shifting for uniformly omitted base indents under brace openers
|
||||
- Added conservative recovery for uniformly omitted replacement indents that would otherwise escape an immediately preceding brace opener, while preserving intentional indentation-only edits
|
||||
|
||||
### Changed
|
||||
|
||||
- Made `.=` the canonical inclusive range separator while retaining legacy separator variants as lenient input
|
||||
- Unified replacement, insertion, register paste, block, head/tail, move, and removal headers under the composable `PUT`, `CUT`, `MV`, and `REM` grammar
|
||||
|
||||
### Fixed
|
||||
|
||||
- Recovered common model output mistakes including numbered read rows, summarized ranges, diff-style old/new rows, empty `PUT` deletes, harmless `CUT` colons, and single-line span shorthand without weakening overlap or stale-snapshot guards
|
||||
|
||||
## [17.2.0] - 2026-07-30
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ Inside a section:
|
||||
- `PUT A*:` — replace the syntactic block beginning on line A.
|
||||
- `PUT <A:` / `PUT >A:` — insert following body rows before/after line A (`<1` = head, `>$` = tail).
|
||||
- `PUT >A*:` — insert following body rows after the resolved block's last line.
|
||||
- `PUT <A` / `PUT >A` / `PUT A.=B @name` — paste a captured register at a gap or over a range (no `:` header, no body rows; `@name` optional at gaps).
|
||||
- `PUT <A` / `PUT >A` / `PUT A.=B @name` / `PUT A* @name` — paste a captured register at a gap, over a range, or over a resolved block (no `:` header or body rows; `@name` is optional only at gaps).
|
||||
- `CUT A.=B` / `CUT A*` — delete concrete lines or a resolved block and capture them (anonymous, or `@name` when given).
|
||||
- `REM` — delete the whole file named by the section header.
|
||||
- `MV DEST` — move/rename the section file to `DEST` (optionally after line edits).
|
||||
|
||||
@@ -8,12 +8,12 @@ file_hash: /[0-9A-F]{4}/
|
||||
filename: /[^#\r\n]+/
|
||||
|
||||
hunk: put_hunk | cut_hunk | rem_hunk | mv_hunk
|
||||
put_hunk: "PUT " put_locator register? ":" LF body*
|
||||
put_hunk: "PUT " put_locator ":" LF body+
|
||||
| "PUT " put_locator register LF
|
||||
| "PUT " gap_locator LF
|
||||
cut_hunk: "CUT " cut_locator register? LF
|
||||
rem_hunk: "REM" LF
|
||||
mv_hunk: "MV " filename LF body*
|
||||
mv_hunk: "MV " filename LF
|
||||
|
||||
put_locator: range | LID "*" | gap_locator
|
||||
cut_locator: range | LID "*"
|
||||
|
||||
@@ -9,7 +9,7 @@ Every file section starts `[PATH#TAG]`. `TAG` = 4-hex snapshot tag from your lat
|
||||
`PUT N*:` — replace the syntactic block BEGINNING on line N; its closing line is resolved for you.
|
||||
`PUT <N:` / `PUT >N:` — insert body rows before / after line N (`PUT <1:` = file head, `PUT >$:` = file tail).
|
||||
`PUT >N*:` — insert body rows after the END of the block beginning at N (at sibling depth). Append inside a block → `PUT >M:`.
|
||||
`PUT <N` / `PUT >N` / `PUT N.=M @name` — paste a captured register at a gap or over a range (no `:` header, no body rows). Unlabeled `PUT` pastes the anonymous register; `@name` selects a named register.
|
||||
`PUT <N` / `PUT >N` / `PUT N.=M @name` / `PUT N* @name` — paste a captured register at a gap, over a range, or over a resolved block (no `:` header, no body rows). Unlabeled gap `PUT` pastes the anonymous register; span/block paste requires `@name`.
|
||||
`CUT N.=M` / `CUT N*` — delete lines N through M / block N and capture them (anonymous, or `@name` when given).
|
||||
`REM` — delete the whole section file. `MV DEST` — move/rename to `DEST` (quote paths with spaces); edits above `MV` land on the source first, final content written at `DEST`.
|
||||
Single line: `PUT N.=N:` / `CUT N.=N`. Range = ORIGINAL lines touched (`N.=M`, inclusive); body length irrelevant.
|
||||
|
||||
Reference in New Issue
Block a user