Re: Weird command line editing issues with Bash
Steve Wechsler <[email protected]> Thu, 9 Nov 2023 16:14:38 -0500
| Newsgroups | gmane.comp.gnu.screen.user |
|---|---|
| Message-ID | <CAAKkq=FOD8NBN3TkJp6WUEef3MSf-9fFDHmQjER9cVQvH1nHFQ@mail.gmail.com> |
--000000000000ba60380609beb12c
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
\033]0;${STY##*.}\007\[\e[00;32m\][${STY##*.}|\u@<hostname> \W]\[\e[00m\]$
On Thu, Nov 9, 2023 at 4:13=E2=80=AFPM Marcin Cieslak <[email protected]> wr=
ote:
> On Thu, 9 Nov 2023, Steve Wechsler wrote:
>
> > 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, t=
he
> > cursor will be positioned after 'awk '{if '. It only seems to be affect=
ed
> > 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, b=
ut
> > it will not line feed, so it starts overwriting the text that is alread=
y
> > 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, Bas=
h
> > version is 4.2.46(2).
>
> What is your $PS1 ?
--000000000000ba60380609beb12c
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">\033]0;${STY##*.}\007\[\e[00;32m\][${STY##*.}|\u@<hostn=
ame> \W]\[\e[00m\]$<br></div><br><div class=3D"gmail_quote"><div dir=3D"=
ltr" class=3D"gmail_attr">On Thu, Nov 9, 2023 at 4:13=E2=80=AFPM Marcin Cie=
slak <<a href=3D"mailto:[email protected]">[email protected]</a>> wrote=
:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.=
8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Thu, 9 Nov =
2023, Steve Wechsler wrote:<br>
<br>
> Frequently I get odd results when using Emacs mode command line editin=
g<br>
> in Bash.<br>
><br>
> 1) Sometimes after scrolling back in my history, the first 9 character=
s of<br>
> the line will remain in place, and the beginning-of-line position move=
s 9<br>
> characters to the right. So, for example, if I scrolled past an entry =
that<br>
> started with "awk '{if ($1 > 100 ) {print $2}', when p=
ressing Ctrl-U, the<br>
> cursor will be positioned after 'awk '{if '. It only seems=
to be affected<br>
> by certain longer entries in the history.<br>
> 2) When typing a line that's longer than my terminal is wide (incl=
uding the<br>
> command prompt), the cursor will return to the beginning of the line, =
but<br>
> it will not line feed, so it starts overwriting the text that is alrea=
dy<br>
> there. If I make my terminal wider and press Ctrl-L, the line can be e=
dited<br>
> normally, until it needs to wrap again, then the problem repeats.<br>
><br>
> Once I exit screen, command line editing in Bash works properly. The E=
macs<br>
> editor itself seems to have no issues, nor does vim.<br>
><br>
> I'm using PuTTy on Windows. $TERM is 'xterm'. I've tri=
ed substituting<br>
> 'vt100' but it didn't fix the problem. Screen=C2=A0 v4.09.=
00 on Centos7, Bash<br>
> version is 4.2.46(2).<br>
<br>
What is your $PS1 ?</blockquote></div>
--000000000000ba60380609beb12c--