autocompletion, small, but annoying problem

Posts: 4077
I got this after an upgrade I think, sometimes when I hit TAB to autocomplete I get this message "grep-status: unexpected end of line."
For example if I want to remove a package I type "apt-get remove package" then then press TAB to autocomplete the name of the package I get this:
apt-get remove packagegrep-status: unexpected end of line.
Anyone knows what's the problem?

Yes, it's on 6.0, I did
Posts: 4077
Yes, it's on 6.0, I did upgrade, this happens on 2 machines. Again this is not an important issue, only if someone knows the answer....
--
Check out Mepis wiki: www.mepis.org/docs

bash-version
Posts: 690
AdrianTM, is this under 6.0? I seem to recall seeing an package update for bash a week or two ago. Did you do a regular apt-get upgrade and see "bash" in the list?I don't have my 6.0 box up, so I can't check to see what version of bash is running.
Jon
I use Mepis 6.0, and I don't have the problem Adrian reported. Installed bash-version here is 3.1-2ubuntu10. I don't know if that is still the 'original' one that came with Mepis or a newer one.
Not much help, I'm afraid
Regards, Ko
Ko Bros

Same here, I don't know
Posts: 4077
Same here, I don't know what's wrong. One of the machine is updated to KDE 3.5.5 and everything I could, the other I just reinstalled and it's only up-to-date with normal repos.
--
Check out Mepis wiki: www.mepis.org/docs
I don't know what's causing
Posts: 365
I don't know what's causing your problem, but I do know two logical places to look.
Your actual bash history is stored in the file:
/home/user/.bash_history
I suspect that file is corrupted, and if you kept your /home when you reinstalled it would still be there to cause the problem. I would try deleting it, and then recreate a blank file there to start over.
The other place is a bit longer shot. The program that actually does the autocompletion is a shell script in /etc/bash_completion. It could also have a problem though it's less likely than the previous suggestion.
Good Luck!

grep-status
Posts: 380
What version of grep-status (or grep-dctrl) do you have? (I have 2.6.7)

I have the same version of
Posts: 4077
I have the same version of grep-dctrl, grep is 2.5.1.ds2-4
/home/user/.bash_history was fine, I delete it just to make sure, same thing.
Never mind, it's really no big deal.
--
Check out Mepis wiki: www.mepis.org/docs
I know you said to forget
Posts: 365
I know you said to forget it, but once I start pondering something it takes a while to shut it off.
I was reading the error message incorrectly as grep status instead of grep-status.
grep-status is used to grep through the /var/lib/dpkg/status file. An unexpected end of line error from grep-status means there's an incomplete entry somewhere in that file.
Have a look!

That makes sense, but1. I
Posts: 4077
That makes sense, but
1. I wonder how did I mess that file on 2 computers (if that's the problem)
2. What's the easiest way to check that file?
--
Check out Mepis wiki: www.mepis.org/docs

Nicely deducted.......:-)
Posts: 690
I know you said to forget it, but once I start pondering something it takes a while to shut it off.I was reading the error message incorrectly as grep status instead of grep-status.
grep-status is used to grep through the /var/lib/dpkg/status file. An unexpected end of line error from grep-status means there's an incomplete entry somewhere in that file.
Have a look!
Nicely deducted...however, that file status contains over 50.000 lines here. Checking it for 'something incomplete' may take a couple of days - or more.
Isn't that file re-generated every time 'apt-get update' is executed? If so, then just delete it and run apt-get update to recreate it - hopefully without the error.
Regards, Ko
Ko Bros
Good idea! There is the
Posts: 365
Good idea!
There is the possibility that there is a corrupt entry somewhere in the repositories, in which case it would show up on any computer updated using that repo...
Do you have any non-standard repos in your list?

Not really everything is
Posts: 4077
Not really everything is pretty standard. By the way, Ko is not right, if you remove that file you screw up your apt-get completely since it will not know if a program is installed or not.
--
Check out Mepis wiki: www.mepis.org/docs
I found a perl script that
Posts: 365
I found a perl script that was written to rebuild a /var/lib/dpkg/status file using the other dpkg log files.
It's worth a try.

Was bash Updated?
Posts: 5513
AdrianTM, is this under 6.0? I seem to recall seeing an package update for bash a week or two ago. Did you do a regular apt-get upgrade and see "bash" in the list?
I don't have my 6.0 box up, so I can't check to see what version of bash is running.
Jon