Public bug reported:
Binary package hint: bash-completion
Ubuntu Jaunty
bash_completion 20080705ubuntu3
Introduction:
Bash functions resolve aliases at the time they are defined.
Bash completion uses functions heavily and depends on the exact semantics of
the commands called.
In the default .bashrc, the aliases section is before the completion section.
To trigger an error:
$ alias grep='grep -H'
$ source /etc/bash_completion
$ dpkg -L <press tab>
A workaround is to make sure all aliases are
Fix #1 (impractical): Call every command prepended with a backslash
Fix #2 (recommended): to /etc/bash_completion, add
\alias>/tmp/bash_aliases_$$
\unalias -a
at the beginning of the file, and
source /tmp/bash_aliases_$$
\rm /tmp/bash_aliases_$$
at the end. This method has the additional effect of fixing any
bash_completion.d functions supplied by other packages.
(I don't think anyone would actually alias the alias/unalias builtins, but it
can't hurt. rm is a realistic target for aliases)
Attached is a patch for Jaunty (diff -u).
** Affects: bash-completion (Ubuntu)
Importance: Undecided
Status: New
--
bash completion functions fail with aliases
https://bugs.launchpad.net/bugs/501742
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs