Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2018 14:10:57 -0400
From:      Lowell Gilbert <freebsd-questions-local@be-well.ilk.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: bash history buffer output mangled after repeated up-arrow
Message-ID:  <44muxr6tse.fsf@be-well.ilk.org>
In-Reply-To: <20180425142605.GA39933@desktop.local> (tech-lists@zyxst.net's message of "Wed, 25 Apr 2018 15:26:06 %2B0100")
References:  <20180425142605.GA39933@desktop.local>

next in thread | previous in thread | raw e-mail | index | archive | help
tech-lists@zyxst.net writes:

> hi,
>
> I've noticed now, for a while (like maybe over a year) that if you're in
> bash shell, hitting up-arrow (which usually loads history -1) multiple
> times will result in part of history becoming the prompt.
>
> I use csh as login shell now because csh doesn't have this problem.
>
> I can re-create the issue by logging in then doing the following:
> % bash
> $ . .profile
> hit uparrow a few times (in this case, 15 times), it gets to this in its
> history:
> bzcat /var/log/messages.1.bz2 |less
>
> prompt is now:
> [john@desktop ~]$ bzcat /var<--cursor is here waiting for input
>
> [keep hitting up arrow]
> now it's [john@desktop ~]$ ls -lah .g[history] where [history] is find
> /usr/src/sys/sys/param.h -mtime; echo
>
> backspacing to (in this case) [john@desktop ~]$ ls -lah .g (which is as
> far as one can backspace on that line) and hitting return, restored
> the normal prompt position. Repeatedly hitting up-arrow mangles bash
> history.
>
> it doesn't happen in csh. Not tried other shells. It only happens on
> freebsd boxes (11-stable and later). I've not seen it happen on
> linuxen (raspabian, mint, ubuntu, centos). It doesn't matter if bash
> is built from source or installed via pkg. Doesn't matter if fdescfs
> is mounted or not.
> It still happens if I create a fresh freebsd-11-stable VM, log into it,
> install bash.
>
> Any ideas?

It doesn't happen to me.

Maybe you've got something weird in your .profile?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44muxr6tse.fsf>