You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: Ctrl+C double-exit in interactive shell (first press hints, second exits)
Implements the two-press Ctrl+C exit pattern: the first Ctrl+C displays
"(Press Ctrl+C again to exit)" and re-displays the prompt; the second
Ctrl+C within 2 seconds prints "Goodbye!" and exits cleanly (code 0).
- Add `_with_ctrl_c_double_exit()` wrapping `question.unsafe_ask()` in a
retry loop — avoids key-binding conflicts that caused the sentinel
approach to fail
- Add `_HardQuitInterrupt(KeyboardInterrupt)` so Ctrl+Q hard-quit bypasses
the retry guard
- Restore explicit ControlC binding in wizard `_base_bindings()` because
`InquirerControl` is not a `BufferControl`, making prompt_toolkit's
default Ctrl+C binding inactive for custom wizard prompts
- Install a SIGINT handler in `main()` for between-prompt Ctrl+C
- Add/update unit tests in `tests/cli/test_prompt_support.py`
- Fix smoke test to use Escape (PTY-safe) instead of Ctrl+C
FixesTracer-Cloud#1091
* fix: add questionary.password to Ctrl+C double-exit and Escape-cancel patches
* fix: use None sentinel for _last_ctrl_c to make never-pressed state explicit
* fix: print newline on unhandled KeyboardInterrupt in main() for clean terminal output
* fix: reset _last_ctrl_c after successful prompt return to prevent cross-prompt leakage
0 commit comments