[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
EOF not disabled in readline
From: |
Grisha Levit |
Subject: |
EOF not disabled in readline |
Date: |
Fri, 24 Jul 2020 01:32:21 -0400 |
It seems that disabling the EOF character does not have an effect on
readline. For example:
$ stty sane
$ stty eof undef
$ ^D
Use "logout" to leave the shell.
$ read -e; echo $?
^D
1
But the setting did take effect, as can be verified by running, e.g.
`read' w/o readline:
$ read -n1; echo ${REPLY@Q}
^D$'\004'
Setting the EOF character to anything else works as expected but, when
followed by an `stty eof undef', readline keeps using whatever the value
that had previously been set.
My goal was to bind a custom function to ^D and, as a workaround, setting
EOF to some nearly-impossible to type character works fine but I'm not
sure if the inability to disable EOF is expected.
- EOF not disabled in readline,
Grisha Levit <=