LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 02-15-2005, 01:52 AM   #1
myrdd|n
LQ Newbie
 
Registered: Feb 2005
Posts: 5

Rep: Reputation: 0
Question {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

Any help appreciated.

Last edited by myrdd|n; 02-18-2005 at 05:58 AM.
 
Old 02-15-2005, 04:33 AM   #2
gnube
LQ Newbie
 
Registered: Dec 2003
Location: Gothenburg, Sweden
Distribution: Fedora | RedHat
Posts: 13

Rep: Reputation: 0
That is a bash feature

The behavior you describe is a bash feature and not a bug.
 
Old 02-15-2005, 04:38 AM   #3
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
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.
 
Old 02-15-2005, 04:51 AM   #4
myrdd|n
LQ Newbie
 
Registered: Feb 2005
Posts: 5

Original Poster
Rep: Reputation: 0
Re: That is a bash feature

Quote:
Originally posted by gnube
The behavior you describe is a bash feature and not a bug.
I'm sure it is a feature, I never said it was a bug. But I don't like how it does this.

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.
 
Old 02-17-2005, 06:52 PM   #5
myrdd|n
LQ Newbie
 
Registered: Feb 2005
Posts: 5

Original Poster
Rep: Reputation: 0
anyone?
 
Old 02-18-2005, 04:51 AM   #6
myrdd|n
LQ Newbie
 
Registered: Feb 2005
Posts: 5

Original Poster
Rep: Reputation: 0
hmm, with some google magic, I found this:

http://lists.gnu.org/archive/html/bu.../msg00282.html

So it is a bug?
 
Old 02-18-2005, 04:57 AM   #7
frostillicus
Member
 
Registered: Jul 2004
Location: Florida
Distribution: Slackware
Posts: 32

Rep: Reputation: 15
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?
 
Old 02-18-2005, 05:07 AM   #8
frostillicus
Member
 
Registered: Jul 2004
Location: Florida
Distribution: Slackware
Posts: 32

Rep: Reputation: 15
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.
 
Old 02-18-2005, 05:59 AM   #9
myrdd|n
LQ Newbie
 
Registered: Feb 2005
Posts: 5

Original Poster
Rep: Reputation: 0
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.
 
Old 02-18-2005, 07:10 AM   #10
gnube
LQ Newbie
 
Registered: Dec 2003
Location: Gothenburg, Sweden
Distribution: Fedora | RedHat
Posts: 13

Rep: Reputation: 0
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
very strange FreeBSD behaviour kpachopoulos *BSD 10 01-30-2005 10:26 PM
strange problem during installation of Freebsd LinuxLover *BSD 3 12-30-2004 05:12 PM
bash output redirection: debian vs freebsd kenners Programming 2 10-07-2004 04:56 PM
A strange bash script kingsyl Linux - Newbie 2 07-13-2004 11:07 PM
Different bash behaviour in FreeBSD? J_Szucs *BSD 9 05-17-2002 07:41 AM


All times are GMT -5. The time now is 11:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration