Skip navigation.
Home
Now Shipping Version 7.0

autocompletion, small, but annoying problem

AdrianTM's picture

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?

Jon Du Quesne's picture

Was bash Updated?

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

AdrianTM's picture

Yes, it's on 6.0, I did

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

Ko Bros's picture

bash-version

Jon Du Quesne wrote:
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

drlizau's picture

original bash for 6.0

3.1-2ubuntu10

AdrianTM's picture

Same here, I don't know

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

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!

Dave_L's picture

grep-status

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

AdrianTM's picture

I have the same version of

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

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!

AdrianTM's picture

That makes sense, but1. I

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

Ko Bros's picture

Nicely deducted.......:-)

timkb4cq wrote:
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

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?

AdrianTM's picture

Not really everything is

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

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.

http://www.cs.duke.edu/~reynolds/projects/dpkg-rebuild

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.