Add persistent watch status screen (wave 3, F1)
render-screen is now the only printing path in watch mode: bold header, current exercise path, captured output, a result line with Exercise done + Solution for comparison on pass, pinned hints, a width-aware colored progress bar (COLUMNS / TIOCGWINSZ / 80), and a dynamic valid-key legend. Non-tty output prints full linear frames delimited by --------; nothing is hidden on pipes. *use-color* now requires a tty (LISPLINGS_COLOR=always/never still override) and moves below stdout-is-tty-p, fixing its load order. One-shot run/hint render the same frame. dev/verify.sh: 70/70.
This commit is contained in:
1 parent
d0f9d8ceab
commit
4c6009e2e4
2 files changed
+261
-93
No files matched your search
@@ -49,19 +49,23 @@ nix run /path/to/lisplings # watch mode, on this directory
|
||||
## The workflow
|
||||
|
||||
1. Run `./lisplings` from the repository root (or your project copy).
|
||||
2. Edit the exercise file shown in the terminal, in any editor.
|
||||
3. Save. The exercise runs again and its checks print.
|
||||
4. When everything passes, press `n` for the next exercise.
|
||||
2. Lisplings keeps one status screen on your terminal: the current
|
||||
exercise file, the output of its checks, the hints you revealed, a
|
||||
progress bar, and the keys that work right now.
|
||||
3. Edit that file in any editor and save. The exercise runs again and
|
||||
the screen redraws; when every check passes it shows `Exercise
|
||||
done ✓` and the matching solution to compare against.
|
||||
4. Press `n` for the next exercise.
|
||||
|
||||
Keys in watch mode:
|
||||
Keys in watch mode (each key is a line: type it, then press ENTER):
|
||||
|
||||
| key | action |
|
||||
| --- | --------------------------------------- |
|
||||
| n | move to the next pending exercise |
|
||||
| h | show a hint |
|
||||
| r | rerun the current exercise |
|
||||
| l | list all exercises |
|
||||
| q | save progress and quit |
|
||||
| key | action |
|
||||
| --- | ------------------------------------ |
|
||||
| n | move to the next pending exercise |
|
||||
| h | show the hint, pinned on the screen |
|
||||
| r | rerun the current exercise |
|
||||
| l | list all exercises |
|
||||
| q | save progress and quit |
|
||||
|
||||
Really stuck? `solutions/` mirrors `exercises/` with every exercise
|
||||
solved.
|
||||
|
||||
Reference in new issue
Block a user