Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic termios support #83

Merged
merged 1 commit into from
Dec 6, 2024
Merged

Add basic termios support #83

merged 1 commit into from
Dec 6, 2024

Conversation

ianthomas23
Copy link
Member

Add basic termios support. This is needed for interactive commands such as vim.

It overrides the emscripten functions TTY.default_tty_ops.ioctl_tcgets and tcsets to store and use a local version of the termios structure defined in termios.ts. Initially it only supports use of the output flag ONLCR to control conversion of \n to \r\n, more will be added as needed.

There is a new wasm command check_termios included, both source and compiled code, so that termios settings can be tested. You pass in the flags you want to chance as command arguments, then it loops accepting stdin and writing to stdout.

This is inspired by the marvellous xterm-pty.

@ianthomas23 ianthomas23 added the enhancement New feature or request label Dec 6, 2024
@ianthomas23 ianthomas23 merged commit 430ad63 into main Dec 6, 2024
7 checks passed
@ianthomas23 ianthomas23 deleted the termios branch December 6, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant