It's done the way it is to save RAM and startup time for every
interactive bash. If bash had to store both versions of a function, and
pick at runtime, it would be slightly slower every completion, and more
importantly, slightly slower to load.
As I understand it, this is the design tradeoff that bash-completion
has decided to make. It's already a huge amount of shell code running
every time an interactive shell starts, and I guess any bandaid that can
be put on the problem is applied...
I don't think you want to suppress error messages. Instead of having
something just silently not working, it's better for the user to see something
is wrong, so they can
complete -r; . /usr/share/bash-completion/bash_completion
or start a new shell. If they don't understand what happened or why, then they
don't have to. Or IDK, maybe it would be better to 2>/dev/null something, and
have silently not-working completion for that until the restart their shell.
** Changed in: bash-completion (Ubuntu)
Status: New => Opinion
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1388445
Title:
bash-completion, command-not-found and '_have' function
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/bash-completion/+bug/1388445/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs