Re: [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
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 300 baud; line = 0; erase = ^H; ixany iutf8 speed 300 baud; rows 60; columns 120; line = 0; intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ; eol2 = ; 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 300 baud; line = 0; erase = ^H; swtch = ^Z; ixany iutf8 speed 300 baud; rows 45; columns 120; line = 0; intr = ^C; quit = ^\; erase = ^H; kill = ^U; eof = ^D; eol = ; eol2 = ; 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.]
Re: [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
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
Re: [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
On Mon, 18 May 2020 01:21:07 +0200 Kacper Michajlow via Cygwin-patches 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
Re: [PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
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
[PATCH] Cygwin: termios: Set ECHOE, ECHOK, ECHOCTL and ECHOKE by default.
- 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