Skip to content

feat: add DSR response handling for nushell compatibility#82

Merged
sreya merged 1 commit into
mainfrom
ghostty-web-nushell-fix
Dec 4, 2025
Merged

feat: add DSR response handling for nushell compatibility#82
sreya merged 1 commit into
mainfrom
ghostty-web-nushell-fix

Conversation

@sreya

@sreya sreya commented Dec 4, 2025

Copy link
Copy Markdown
Contributor

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

1 participant