There's something odd about my autocomplete in the gnome terminal.
I used to be able to type cp Down
tab to get cp Downloads/
, and then type Jet
tab to end up with cp Downloads/Jet\ Pack\ Instructions.pdf
But now, when I have cp Down
typed and hit tab, I get cp Downloads
with a space afterwards. And if I backspace that and make it say cp Downloads/Jet
and hit tab, I get cp Downloads/Jet Pack Instructions.pdf
without the backslashes.
It wasn't like this before. How do I fix this?
EDIT: There's a problem with my /etc/bash_completion file, it seems. Just not sure what.
It is caused due to acrobat reader. The file is -
Removing this file, worked correctly for me.
Edit:
Sorry, my original suggestion was incorrect; I didn't pay attention and was thinking about autocompletion when you press the up-arrow, not tab (as pointed out to me after my post).
Original suggestion about history autocompletion
This is controlled by the file ~/.bash_history, which is a text file, so you can look at it, or even edit it. It doesn't save your history forever, so it's possible the old one scrolled off the list. It's also possible that this file got corrupted somehow.
It should be just a long list of commands, in reverse chronological order, with each command on a single line, delimited by linebreaks, so you should be able to see if there's something unusual in it.
I never really thought about this, but you could probably save lines you use a lot, and occasionally append it to this file to make sure you always have those commands.
A better suggestion for Tab Autocompletion
Did you edit this? I don't think it changes, so maybe it's something that was added to /etc/bash_completion.d, which seems to have scripts added to it by installed apps. You could try disabling some of the ones with more recent timestamps to see if it makes a difference, then adding them back one by one or in small groups until it changes. I don't know much about this, but I'm usually good at fixing problems, so my suggestions are not from prior knowledge, but just me trying to be helpful.