mirror of
https://github.com/zsh-users/zsh
synced 2024-09-30 05:06:09 +00:00
51969: read -d and -s should not reset terminal state when stdin is redirected
This commit is contained in:
parent
301412c0e8
commit
aa85564319
|
@ -1,5 +1,8 @@
|
||||||
2023-07-26 Bart Schaefer <schaefer@zsh.org>
|
2023-07-26 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* 51969: Src/builtin.c: read -d and -s should not reset terminal
|
||||||
|
state when stdin is redirected
|
||||||
|
|
||||||
* 51949 (tweak per 51950): Src/Zle/zle_main.c: correct Thingy
|
* 51949 (tweak per 51950): Src/Zle/zle_main.c: correct Thingy
|
||||||
refcount in raw_getbyte()
|
refcount in raw_getbyte()
|
||||||
|
|
||||||
|
|
|
@ -6483,7 +6483,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func))
|
||||||
} else
|
} else
|
||||||
readfd = izle = 0;
|
readfd = izle = 0;
|
||||||
|
|
||||||
if (OPT_ISSET(ops,'s') && SHTTY != -1) {
|
if (OPT_ISSET(ops,'s') && SHTTY == readfd) {
|
||||||
struct ttyinfo ti;
|
struct ttyinfo ti;
|
||||||
gettyinfo(&ti);
|
gettyinfo(&ti);
|
||||||
saveti = ti;
|
saveti = ti;
|
||||||
|
@ -6531,7 +6531,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func))
|
||||||
delim = (unsigned char) ((delimstr[0] == Meta) ?
|
delim = (unsigned char) ((delimstr[0] == Meta) ?
|
||||||
delimstr[1] ^ 32 : delimstr[0]);
|
delimstr[1] ^ 32 : delimstr[0]);
|
||||||
#endif
|
#endif
|
||||||
if (SHTTY != -1) {
|
if (SHTTY == readfd) {
|
||||||
struct ttyinfo ti;
|
struct ttyinfo ti;
|
||||||
gettyinfo(&ti);
|
gettyinfo(&ti);
|
||||||
if (! resettty) {
|
if (! resettty) {
|
||||||
|
@ -6691,7 +6691,7 @@ bin_read(char *name, char **args, Options ops, UNUSED(int func))
|
||||||
/* dispose of result appropriately, etc. */
|
/* dispose of result appropriately, etc. */
|
||||||
if (isem)
|
if (isem)
|
||||||
while (val > 0 && read(SHTTY, &d, 1) == 1 && d != '\n');
|
while (val > 0 && read(SHTTY, &d, 1) == 1 && d != '\n');
|
||||||
else {
|
else if (resettty) {
|
||||||
settyinfo(&shttyinfo);
|
settyinfo(&shttyinfo);
|
||||||
resettty = 0;
|
resettty = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue