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

stty: implement "Special Control Character Assignments" #6799

Open
andrewliebenow opened this issue Oct 19, 2024 · 1 comment
Open

stty: implement "Special Control Character Assignments" #6799

andrewliebenow opened this issue Oct 19, 2024 · 1 comment
Labels

Comments

@andrewliebenow
Copy link
Contributor

stty does not implement "Special Control Character Assignments":

eof
eol
erase
intr
kill
quit
susp
start
stop

See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/stty.html#tag_20_123_05_05

For example:

❯ /usr/bin/stty intr '' ; coreutils printf '%s\n' "${?:?}"
0
# Control-C is now unbound (does not send SIGINT)

❯ coreutils stty intr '' ; coreutils printf '%s\n' "${?:?}"
stty: invalid argument 'intr'
1
# Control-C is still bound
@andrewliebenow
Copy link
Contributor Author

I have added a commit to #6798 that implements this missing feature. I'm not sure how to add tests that would work in CI, though, because it seems like /dev/tty isn't set up in GitHub Actions workflows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants