* [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
@ 2020-05-17 2:34 Takashi Yano
2020-05-17 23:21 ` Kacper Michajlow
2020-05-19 10:05 ` Corinna Vinschen
0 siblings, 2 replies; 5+ messages in thread
From: Takashi Yano @ 2020-05-17 2:34 UTC (permalink / raw)
To: cygwin-patches
- Backspace key does not work correctly in linux session opend by
ssh from cygwin console if the shell is bash. This is due to lack
of these flags.
Addresses: https://cygwin.com/pipermail/cygwin/2020-May/244837.html.
---
winsup/cygwin/fhandler_termios.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
index b6759b0a7..b03478b87 100644
--- a/winsup/cygwin/fhandler_termios.cc
+++ b/winsup/cygwin/fhandler_termios.cc
@@ -33,7 +33,8 @@ fhandler_termios::tcinit (bool is_pty_master)
tc ()->ti.c_iflag = BRKINT | ICRNL | IXON | IUTF8;
tc ()->ti.c_oflag = OPOST | ONLCR;
tc ()->ti.c_cflag = B38400 | CS8 | CREAD;
- tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN;
+ tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN
+ | ECHOE | ECHOK | ECHOCTL | ECHOKE;
tc ()->ti.c_cc[VDISCARD] = CFLUSH;
tc ()->ti.c_cc[VEOL] = CEOL;
--
2.21.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
2020-05-17 2:34 [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default Takashi Yano
@ 2020-05-17 23:21 ` Kacper Michajlow
2020-05-18 0:50 ` Takashi Yano
2020-05-19 10:05 ` Corinna Vinschen
1 sibling, 1 reply; 5+ messages in thread
From: Kacper Michajlow @ 2020-05-17 23:21 UTC (permalink / raw)
To: cygwin-patches
On Sun, 17 May 2020 at 04:53, Takashi Yano via Cygwin-patches <
cygwin-patches@cygwin.com> wrote:
> - Backspace key does not work correctly in linux session opend by
> ssh from cygwin console if the shell is bash. This is due to lack
> of these flags.
>
> Addresses: https://cygwin.com/pipermail/cygwin/2020-May/244837.html.
> ---
> winsup/cygwin/fhandler_termios.cc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/winsup/cygwin/fhandler_termios.cc
> b/winsup/cygwin/fhandler_termios.cc
> index b6759b0a7..b03478b87 100644
> --- a/winsup/cygwin/fhandler_termios.cc
> +++ b/winsup/cygwin/fhandler_termios.cc
> @@ -33,7 +33,8 @@ fhandler_termios::tcinit (bool is_pty_master)
> tc ()->ti.c_iflag = BRKINT | ICRNL | IXON | IUTF8;
> tc ()->ti.c_oflag = OPOST | ONLCR;
> tc ()->ti.c_cflag = B38400 | CS8 | CREAD;
> - tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN;
> + tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN
> + | ECHOE | ECHOK | ECHOCTL | ECHOKE;
>
> tc ()->ti.c_cc[VDISCARD] = CFLUSH;
> tc ()->ti.c_cc[VEOL] = CEOL;
> --
> 2.21.0
>
>
Maybe also set IXANY | IMAXBEL? For reasonable set of default values.
- Kacper
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
2020-05-17 23:21 ` Kacper Michajlow
@ 2020-05-18 0:50 ` Takashi Yano
2020-05-19 19:33 ` Brian Inglis
0 siblings, 1 reply; 5+ messages in thread
From: Takashi Yano @ 2020-05-18 0:50 UTC (permalink / raw)
To: cygwin-patches
On Mon, 18 May 2020 01:21:07 +0200
Kacper Michajlow via Cygwin-patches <cygwin-patches@cygwin.com> wrote:
> On Sun, 17 May 2020 at 04:53, Takashi Yano via Cygwin-patches <
> cygwin-patches@cygwin.com> wrote:
>
> > - Backspace key does not work correctly in linux session opend by
> > ssh from cygwin console if the shell is bash. This is due to lack
> > of these flags.
> >
> > Addresses: https://cygwin.com/pipermail/cygwin/2020-May/244837.html.
> > ---
> > winsup/cygwin/fhandler_termios.cc | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/winsup/cygwin/fhandler_termios.cc
> > b/winsup/cygwin/fhandler_termios.cc
> > index b6759b0a7..b03478b87 100644
> > --- a/winsup/cygwin/fhandler_termios.cc
> > +++ b/winsup/cygwin/fhandler_termios.cc
> > @@ -33,7 +33,8 @@ fhandler_termios::tcinit (bool is_pty_master)
> > tc ()->ti.c_iflag = BRKINT | ICRNL | IXON | IUTF8;
> > tc ()->ti.c_oflag = OPOST | ONLCR;
> > tc ()->ti.c_cflag = B38400 | CS8 | CREAD;
> > - tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN;
> > + tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN
> > + | ECHOE | ECHOK | ECHOCTL | ECHOKE;
> >
> > tc ()->ti.c_cc[VDISCARD] = CFLUSH;
> > tc ()->ti.c_cc[VEOL] = CEOL;
> > --
> > 2.21.0
> >
> >
> Maybe also set IXANY | IMAXBEL? For reasonable set of default values.
I don't think so, because they are not set also in xterm in linux.
--
Takashi Yano <takashi.yano@nifty.ne.jp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
2020-05-17 2:34 [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default Takashi Yano
2020-05-17 23:21 ` Kacper Michajlow
@ 2020-05-19 10:05 ` Corinna Vinschen
1 sibling, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2020-05-19 10:05 UTC (permalink / raw)
To: cygwin-patches
On May 17 11:34, Takashi Yano via Cygwin-patches wrote:
> - Backspace key does not work correctly in linux session opend by
> ssh from cygwin console if the shell is bash. This is due to lack
> of these flags.
>
> Addresses: https://cygwin.com/pipermail/cygwin/2020-May/244837.html.
> ---
> winsup/cygwin/fhandler_termios.cc | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/winsup/cygwin/fhandler_termios.cc b/winsup/cygwin/fhandler_termios.cc
> index b6759b0a7..b03478b87 100644
> --- a/winsup/cygwin/fhandler_termios.cc
> +++ b/winsup/cygwin/fhandler_termios.cc
> @@ -33,7 +33,8 @@ fhandler_termios::tcinit (bool is_pty_master)
> tc ()->ti.c_iflag = BRKINT | ICRNL | IXON | IUTF8;
> tc ()->ti.c_oflag = OPOST | ONLCR;
> tc ()->ti.c_cflag = B38400 | CS8 | CREAD;
> - tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN;
> + tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN
> + | ECHOE | ECHOK | ECHOCTL | ECHOKE;
>
> tc ()->ti.c_cc[VDISCARD] = CFLUSH;
> tc ()->ti.c_cc[VEOL] = CEOL;
> --
> 2.21.0
Pushed.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
2020-05-18 0:50 ` Takashi Yano
@ 2020-05-19 19:33 ` Brian Inglis
0 siblings, 0 replies; 5+ messages in thread
From: Brian Inglis @ 2020-05-19 19:33 UTC (permalink / raw)
To: cygwin-patches
On 2020-05-17 18:50, Takashi Yano wrote:
> On Mon, 18 May 2020 01:21:07 +0200, Kacper Michajlow wrote:
>> On Sun, 17 May 2020 at 04:53, Takashi Yano wrote:
>>> - Backspace key does not work correctly in linux session opend by
>>> ssh from cygwin console if the shell is bash. This is due to lack
>>> of these flags.
>>>
>>> Addresses: https://cygwin.com/pipermail/cygwin/2020-May/244837.html.
>>> ---
>>> winsup/cygwin/fhandler_termios.cc | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/winsup/cygwin/fhandler_termios.cc
>>> b/winsup/cygwin/fhandler_termios.cc
>>> index b6759b0a7..b03478b87 100644
>>> --- a/winsup/cygwin/fhandler_termios.cc
>>> +++ b/winsup/cygwin/fhandler_termios.cc
>>> @@ -33,7 +33,8 @@ fhandler_termios::tcinit (bool is_pty_master)
>>> tc ()->ti.c_iflag = BRKINT | ICRNL | IXON | IUTF8;
>>> tc ()->ti.c_oflag = OPOST | ONLCR;
>>> tc ()->ti.c_cflag = B38400 | CS8 | CREAD;
>>> - tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN;
>>> + tc ()->ti.c_lflag = ISIG | ICANON | ECHO | IEXTEN
>>> + | ECHOE | ECHOK | ECHOCTL | ECHOKE;
>>>
>>> tc ()->ti.c_cc[VDISCARD] = CFLUSH;
>>> tc ()->ti.c_cc[VEOL] = CEOL;
>>> --
>>> 2.21.0
>> Maybe also set IXANY | IMAXBEL? For reasonable set of default values.
> I don't think so, because they are not set also in xterm in linux.
IMAXBEL defaults in Cygwin mintty and Debian lxterminal:
my non-default settings are in the first output group;
all current settings are in the second output group;
these settings work with no issues across Cygwin and Linux systems;
on BSD YMMV:
Cygwin 3.1.4 mintty 3.1.4 $ stty; echo; stty -a
speed 3000000 baud; line = 0;
erase = ^H;
ixany iutf8
speed 3000000 baud; rows 60; columns 120; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 =
<undef>; swtch = ^Z; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -tostop echoctl echoke -flusho
Debian 10.4 lxterminal 0.3.2 $ stty; echo; stty -a
speed 3000000 baud; line = 0;
erase = ^H; swtch = ^Z;
ixany iutf8
speed 3000000 baud; rows 45; columns 120; line = 0;
intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = <undef>; eol2 =
<undef>; swtch = ^Z; start = ^Q; stop = ^S;
susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O; min = 1; time = 0;
-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts
-ignbrk brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff
-iuclc ixany imaxbel iutf8
opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt
echoctl echoke -flusho -extproc
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in IEC units and prefixes, physical quantities in SI.]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-05-19 19:33 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-17 2:34 [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default Takashi Yano
2020-05-17 23:21 ` Kacper Michajlow
2020-05-18 0:50 ` Takashi Yano
2020-05-19 19:33 ` Brian Inglis
2020-05-19 10:05 ` Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).