Weird command line editing issues with Bash
Steve Wechsler <[email protected]> Thu, 9 Nov 2023 15:58:01 -0500
| Newsgroups | gmane.comp.gnu.screen.user |
|---|---|
| Message-ID | <CAAKkq=FP9wmStzXM_Sg+r5e0qeam0AYmbDMFfT=OtwUFctvKQA@mail.gmail.com> |
--0000000000005028dc0609be7665
Content-Type: text/plain; charset="UTF-8"
Frequently I get odd results when using Emacs mode command line editing
in Bash.
1) Sometimes after scrolling back in my history, the first 9 characters of
the line will remain in place, and the beginning-of-line position moves 9
characters to the right. So, for example, if I scrolled past an entry that
started with "awk '{if ($1 > 100 ) {print $2}', when pressing Ctrl-U, the
cursor will be positioned after 'awk '{if '. It only seems to be affected
by certain longer entries in the history.
2) When typing a line that's longer than my terminal is wide (including the
command prompt), the cursor will return to the beginning of the line, but
it will not line feed, so it starts overwriting the text that is already
there. If I make my terminal wider and press Ctrl-L, the line can be edited
normally, until it needs to wrap again, then the problem repeats.
Once I exit screen, command line editing in Bash works properly. The Emacs
editor itself seems to have no issues, nor does vim.
I'm using PuTTy on Windows. $TERM is 'xterm'. I've tried substituting
'vt100' but it didn't fix the problem. Screen v4.09.00 on Centos7, Bash
version is 4.2.46(2).
--0000000000005028dc0609be7665
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><div>Frequently I get odd results when using Emacs mode co=
mmand line editing in=C2=A0Bash.=C2=A0</div><div><br></div><div>1) Sometime=
s after scrolling back in my history, the first 9 characters of the line wi=
ll remain in place,=C2=A0and the=C2=A0beginning-of-line position moves 9 ch=
aracters to the right. So, for example, if I scrolled past an entry that st=
arted with "awk '{if ($1 > 100 ) {print $2}', when pressing=
Ctrl-U, the cursor will be positioned after 'awk '{if '. It on=
ly seems to be affected by certain longer entries in the history.<br></div>=
<div>2) When typing a=C2=A0line that's longer than my terminal is=C2=A0=
wide (including the command=C2=A0prompt), the cursor will return to the beg=
inning of the line, but it will not line feed, so it starts overwriting the=
text that is already there. If I make my terminal wider and press Ctrl-L, =
the line can be edited normally,=C2=A0until it needs to wrap again, then th=
e problem repeats.</div><div><br></div><div>Once I exit screen, command lin=
e editing in Bash works properly. The Emacs editor itself seems to have no =
issues, nor does vim.</div><div><br></div>I'm using PuTTy on Windows. $=
TERM is 'xterm'. I've tried substituting 'vt100' but it=
didn't fix the problem. Screen=C2=A0 v4.09.00 on Centos7, Bash version=
is 4.2.46(2).</div>
--0000000000005028dc0609be7665--