*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I'm having a slightly annoying issue with the BASH command history feature on my FreeBSD 4.10-RELEASE system.
If I scroll up more than two commands in the history, and then go back down, instead of going back to a blank prompt (if it was blank to begin with), it shows the second from last command that I scrolled up to.
So lets say I start out with a blank prompt and we scroll up the history with the arrow key once, twice, then three times.
When I scroll back down, instead of going back to the blank prompt, the second command I scrolled up to is there.
This requires me to take two or three extra seconds to erase the command and type a new one. Totally unacceptable
it seems in this case bash is not viewing the current blank prompt as part of the history stack and therefore will not retrieve it once the arrow keys are used. a cheap workaround might be to hit enter at a blank prompt before you use the arrow keys,that should put the empty prompt in the stack and let you backtrack to it.
Slackware 9.1 and Fedora Core 2 return to a blank prompt, but both use bash2.05b, maybe not the same as yours. I would say that if yours is not a bug then it should be, it would drive me nuts and be, as you said, unacceptable. I dunno, if it is a feature it seems rather boneheaded, not being able to return to where you were before. But who knows.
>>> I regularly access about 11 different servers, running FreeBSD/Linux, some with bash, some not, and the ones with bash do not operate in the same fashion I described above.
I'm confused, the ones with bash do not operate in the same fashion?
I installed the latest patched BASH using FreeBSD's ports, and now it works perfect, the way it should
The reason I didn't think to even look for a newer version is simply because I didn't know there was one, according to this file listing: http://ftp.gnu.org/gnu/bash/
And since I wasn't sure if this was a bug, I couldn't be bothered to apply any patches.