{FIXED} Strange problem with BASH (FreeBSD 4.10)
{FIXED} 2/18/05
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 :p Any help appreciated. |
That is a bash feature
The behavior you describe is a bash feature and not a bug.
|
I'm not sure if/how the behavior you want would be defined. But I know you can save a couple of picoseconds by hitting ^U (CTL-u) instead of the backspace key -- that deletes the whole command line.
|
Re: That is a bash feature
Quote:
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. So I know there is a setting, or something that can be tweaked. |
anyone?
|
hmm, with some google magic, I found this:
http://lists.gnu.org/archive/html/bu.../msg00282.html So it is a bug? |
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? |
ain't google great? yeah, that's a full-on bug. but that was in 6/04, maybe there's a patch by now. otherwise snag an older bash version and use that.
|
I installed the latest patched BASH using FreeBSD's ports, and now it works perfect, the way it should :D
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. |
I misunderstood
My apologies, I completely misunderstood your original post. I think that it was in fact a full flown bug and if newer versions fix it it seems to confirm that you found a bug.
|
All times are GMT -5. The time now is 05:25 AM. |