On Friday 24 October 2008 22:02:35 David Paleino wrote:
> As I already explained to you all, bash-completion doesn't work when BASH
> is called as /bin/sh, it's intended. You *MUST* call it as /bin/bash.
If I call bash as /bin/sh I'm using a sh-compatible bash, so, as the package
name implies, bash-completion can't work, but the problem is that it outputs
garbage and renders the whole /bin/sh hard to use. That way, one cannot have
bash-completion installed and use /bin/sh as shell for a few users, without
also tweaking some other configuration file for each user to manually disable
bash-completion ($HOME/.profile in particular). Moreover, the useradd command
creates users with /bin/sh as default shell, and that's the way I ended up
with /bin/sh without even realizing it.
However now I think it's a problem in the bash package itself, because it
installs a /etc/skel/.profile that has a broken bash test, imho:
# if running bash
if [ -n "$BASH_VERSION" ]; then
I don't really know the intent of that test, however it detects a bash
launched as /bin/sh as a common bash, because the BASH_COMPLETION variable is
defined also when bash is run as /bin/sh. Then it sources .bashrc, which in
turn sources bash_completion scripts.
Should we forward this bug to bash?
Lucio.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]