Commit 0d4f065
(feat): Add
* feat: add `@continue N` to skip N-1 hits and stop at Nth
Wraps existing @cond (if any) with a countdown closure. Only counts
hits where @cond is true (IDE model), restoring the original condition
once the counter is exhausted.
* test: update terminal regression outputs for @continue N help text
* test: add @continue N tests with value verification
- continue_n: @continue 3 without condition, verify i==4
- continue_n_cond: @continue 3 with @cond i%2==0, verify i==6
* test: regenerate outputs for Julia 1.7-1.11
Regenerated f.multiout and g.multiout for help text change,
and added continue_n/continue_n_cond snapshots for @continue N tests.
* test: add Julia 1.6 outputs (copied from 1.7)
Copied from 1.7 outputs since TerminalRegressionTests fails to
resolve locally on 1.6. All existing 1.6 outputs are identical
to 1.7 (except toplevel.multiout), so the copy should be correct.
To be verified by CI.
* fix: improve @continue N error message with validation
Consolidate input validation with `string(n) != rest` to catch
trailing garbage (e.g. "5 1", "3.5"), and show a clearer error
message with "Invalid usage." highlighted in red.
* docs: add description for @continue N command in README
* fix: enhance @continue N validation and handle single continuation case
* style: fix Runic formatting for indexing expression
* refactor: fold plain @continue into @continue N branch and rename prev
Address PR review feedback:
- Merge `@continue` and `@continue N` into a single branch with n=1
fast-path for the plain case
- Rename captured variable `prev` to `orig_cond` for clarity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix: restore stale @continue N countdowns on session end
Replace the anonymous closure with a CountdownCond callable struct that
tracks the session generation at creation time. When a session ends
prematurely (error, @abort), SESSION_GEN is bumped and the countdown
self-heals on next evaluation by restoring the original @cond.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix format
* refactor: move SESSION_GEN counter into Session struct as generation field
Per reviewer feedback, the session generation counter belongs inside
the Session struct for correctness with potential future multi-session
support, rather than as a global Ref.
* refactor: address reviewer feedback on @continue N parsing
- Simplify @continue guard to startswith(sline, r"@continue\b")
- Relax input validation: accept any parseable positive Int (e.g. +3, 03)
- Remove skip message println for consistency with other REPL commands
- Regenerate test outputs for all Julia versions (1.6-1.12)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>@continue N command (#169)1 parent bf378b2 commit 0d4f065
File tree
31 files changed
+1875
-1
lines changed- src
- test
- outputs
- 1.10
- 1.11
- 1.12
- 1.6
- 1.7
- 1.8
- 1.9
31 files changed
+1875
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| 145 | + | |
| 146 | + | |
145 | 147 | | |
146 | 148 | | |
147 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
214 | 254 | | |
215 | 255 | | |
216 | 256 | | |
217 | 257 | | |
218 | 258 | | |
| 259 | + | |
219 | 260 | | |
220 | 261 | | |
221 | 262 | | |
222 | 263 | | |
223 | 264 | | |
| 265 | + | |
224 | 266 | | |
225 | 267 | | |
226 | 268 | | |
| |||
313 | 355 | | |
314 | 356 | | |
315 | 357 | | |
| 358 | + | |
316 | 359 | | |
317 | 360 | | |
318 | 361 | | |
| |||
488 | 531 | | |
489 | 532 | | |
490 | 533 | | |
| 534 | + | |
491 | 535 | | |
492 | 536 | | |
493 | 537 | | |
| |||
781 | 825 | | |
782 | 826 | | |
783 | 827 | | |
784 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
785 | 848 | | |
786 | 849 | | |
787 | 850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
0 commit comments