Please enable smart bash completion by default

Bug #11414 reported by Johan Walles on 2004-12-23
24
Affects Status Importance Assigned to Milestone
bash (Ubuntu)
Wishlist
Matthias Klose

Bug Description

Bash completion is off by default in /etc/bash.bashrc.

I'd like to have it be on by default instead. That would entail ending
/etc/bash.bashrc thusly:

# enable bash completion in interactive shells
if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
fi

Colin Watson (cjwatson) wrote :

This causes a noticeable (and annoying) delay in starting up new shells on some
of my systems ...

Johan Walles (walles) wrote :

This is quite easy for me to switch on manually, so to me it isn't the end of
the world if this bug gets WONTFIXed.

I do think however that for people who aren't familiar with the smart bash
completion, the feature may go undiscovered for quite long unless it's on by
default.

But as I said, this is easy for me to switch on manually, so I don't really mind
that much if you decide not to honor this request.

Pokey (pokey) wrote :

I've installed Ubuntu for a few Windows users. It brought a smile to my face
when a couple of them independently decided that the coolest thing about this
new OS was, of all things, the smart tab completion in bash (which I tend to
enable myself system-wide after the installation).

People are used to swish graphics, sounds and fancy desktop managers but people
using Linux for the first time seem to be most impressed by little features like
this.

When you type 'ifup' and hit tab, getting a list of files in your home directory
for completion is silly when you can get a list of interfaces that can be
brought up. It just makes things work the way you'd expect. It's intuitive.

Enabling this by default seems like a great idea. If there are performance
issues (I've never noticed), this might act as a catalyst for people to optimise
the feature. Let's not be so conservative!

Matt Zimmerman (mdz) wrote :

*** Bug 15159 has been marked as a duplicate of this bug. ***

Matthias Klose (doko) wrote :

there's always a tradeoff.

- the argument that you have to edit something is valid for both alternatives.

- you usually have to know about things, which are disabled by default, so it's
  more likely you see the slowlyness, when it's enabled, and you can disable it.

- what's our target audience? Is there a default for that audience?

I'm going to enable that after the breezy release and looking at the complaints.

This brings a joy to many users faces, especially when they had previous been complaining that the they only thing they could fault with 'sudo' is that the commands would not tab-complete.

This is one of those things that makes an operating system "Just Work(tm)"; much like 'hald' and 'udev', both of which also take CPU cycles in exchange for making a user's life simpler.

I would dearly love to see it enabled, I have it everywhere and find life tedious and slow with it.

Chris Moore (dooglus) wrote :

This isn't necessarily a black and white decision - we can enable some of the completions, and leave the rest disabled.

I find the shell prompt annoying without any smart completions enabled, but bash is very slow to start up with them all enabled. I think we need to decide which completions are worth enabling for "our target audience" and enable just those ones.

/etc/bash_completion is over 8000 lines long, and defines programmable completions for commands such as 'mkinitrd', which I doubt more than 1% of ubuntu users ever run, and 'pine', which as far as I can tell isn't even in any of the ubuntu repositories.

Is there maybe some way that the programmable completions for a command could be added by the package manager when the corresponding package is installed? It seems silly that I have to wait for bash to read completions for ncftp every time I start a terminal when I don't even have ncftp installed.

Matthias Klose (doko) on 2006-01-23
Changed in bash:
status: Confirmed → Fix Committed

i think the usefullness is well worth the cpu cycles, and Pokey is right on with his comments--new linux users love this more than just about anything else.

Matthias Klose (doko) wrote :

> /etc/bash_completion is over 8000 lines long, and defines
> programmable completions for commands such as 'mkinitrd',
> which I doubt more than 1% of ubuntu users ever run, and 'pine',
> which as far as I can tell isn't even in any of the ubuntu repositories.

so how would you make up that "1%"? maybe we can get out 2% of the completions, but these are then missing when the package is installed. movong the completion code to the corresponding package and splitting the bash_completion over some hundred source packages becomes a maintainance nightmare.

Changed in bash:
status: Fix Committed → Fix Released
Sah Lee (leesah) wrote :

I see this report is very old. I found it from Google.
I notice this smart completion is still turned off in /etc/bash.bashrc in Ubuntu 12.04. I wanna know if there is something I need to know before I turn it on. Like is there a new way to do this now?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.