coreutils
coreutils copied to clipboard
stty: implement "Special Control Character Assignments"
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
I have added a commit to https://github.com/uutils/coreutils/pull/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.
@cakebaker #7931 and #8135 fix this issue
@willshuttleworth thanks for the hint!