From owner-freebsd-questions@freebsd.org Wed Apr 25 18:11:05 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC180FABE25 for ; Wed, 25 Apr 2018 18:11:05 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from be-well.ilk.org (be-well.ilk.org [23.30.133.173]) by mx1.freebsd.org (Postfix) with ESMTP id 670AB80A85 for ; Wed, 25 Apr 2018 18:11:05 +0000 (UTC) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: by be-well.ilk.org (Postfix, from userid 1147) id 0E62C33C22; Wed, 25 Apr 2018 14:10:57 -0400 (EDT) From: Lowell Gilbert To: freebsd-questions@freebsd.org Subject: Re: bash history buffer output mangled after repeated up-arrow References: <20180425142605.GA39933@desktop.local> Date: Wed, 25 Apr 2018 14:10:57 -0400 In-Reply-To: <20180425142605.GA39933@desktop.local> (tech-lists@zyxst.net's message of "Wed, 25 Apr 2018 15:26:06 +0100") Message-ID: <44muxr6tse.fsf@be-well.ilk.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Apr 2018 18:11:05 -0000 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?