Skip to content

Conversation

@sreya
Copy link
Contributor

@sreya sreya commented Dec 4, 2025

Fixes #72

Implement Device Status Report (DSR) response handling to fix
compatibility with shells like nushell that rely on cursor position
queries.

Changes:
- Add ResponseHandler in WASM that processes DSR queries and queues responses
- Support DSR 5 (operating status) returning \x1b[0n
- Support DSR 6 (cursor position) returning \x1b[row;colR
- Add ghostty_terminal_has_response() and ghostty_terminal_read_response() exports
- Update Terminal.ts to emit responses via onData after writes

When nushell sends \x1b[6n to query cursor position, the terminal now
responds with the cursor coordinates, allowing nushell to continue
initialization instead of hanging.

Fixes #73
@sreya sreya merged commit 3dd4aef into main Dec 4, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Demo doesn't work with nushell

1 participant