How do I get the 'old' bash completion back?

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
rosyth
Level 1
Level 1
Posts: 9
Joined: Fri Jan 17, 2020 3:53 pm

How do I get the 'old' bash completion back?

Post by rosyth »

Code: Select all

bash --version
GNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

Code: Select all

aptitude show bash-completion
Package: bash-completion                 
Version: 1:2.10-1ubuntu1
State: installed
Automatically installed: no
Multi-Arch: foreign
Priority: standard
Section: shells
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Architecture: all
Uncompressed Size: 1,523 k
Provides: bash-completion:i386 (= 1:2.10-1ubuntu1)
Description: programmable completion for the bash shell
 bash completion extends bash's standard completion behavior to achieve complex
 command lines with just a few keystrokes.  This project was conceived to
 produce programmable completion routines for the most common Linux/UNIX
 commands, reducing the amount of typing sysadmins and programmers need to do on
 a daily basis.
Homepage: https://github.com/scop/bash-completion
I don't want to be an IT admin, I've got other things to waste my time on. So it frustrates me a bit when I end up spending an hour or more just to figure out why something that used to work pretty well now doesn't.

My problem here is with bash and tab completion.

Code: Select all

tar -z -tvf makbash: no match: --occurrence[=NUMBER]
Duh !!? hitting TAB after 'mak' gets this nonsense. It should expand to the file I want to look at, eg... manually typing

Code: Select all

tar -z -xvf make_boabab_run_as_root.tgz 
usr/share/polkit-1/actions/org.gnome.baobab.policy
Instead of just expanding to all local file matches, tab completion seems to be a super bloated feature that does not even have the decency to fail gracefully.

I see 122037 lines of configuration files !!! in /usr/share/bash-completion/completions/* including >700 lines for tar.

Really? I don't remember a great clamour from desperate Linux users for a 'better' tab completion.

So ... rant over....
Question.
How do I get the simple tab completion back?
Is it simply uninstalling 'bash-completion' ? Or will that mess up everything?
I don't really need all the bells and whistles like argument expansion etc etc. But I do want it to work when I need it.
This isn't the first command that I've found it impossible to simply expand out to the file name I want.
Post Reply

Return to “Newbie Questions”