[Bash-completion-devel] Thanks for packaging bash-completion!

Trent W. Buck trentbuck at gmail.com
Wed Feb 15 02:07:33 UTC 2012


David Paleino wrote:
>> Unfortunately my current netbook is a funky ARM thing that is running
>> ubuntu 11.10 until I find time to migrate it to wheezy.  Is it
>> feasible to just drop current wheezy bash-completion .deb into an old
>> ubuntu install?  I realize it's usually a stupid thing to try, but I
>> suspect bash-completion is fairly isolated and unlikely to break
>> anything.  Ubuntu 11.10 ships with bash 4.2 and bash-completion 1:1.3.
>
> I believe it's pretty safe to do -- yes. Oh well, if you run into
> any problems, you can always downgrade bash-completion to the
> version you have in the repositories :)

FYI, it seems to work, although even with the new dynamic loading,
it's still irritatingly slow to load.  This is quite strange, thought
I'd point it out:

    $ time bash -c '. /etc/bash_completion'
    /etc/bash_completion.d/gcc: line 50: [: too many arguments
    /etc/bash_completion.d/ifupdown: line 3: [: =: unary operator expected
    /etc/bash_completion.d/ifupdown: line 19: [: =: unary operator expected
    /etc/bash_completion.d/ipsec: line 3: [: =: unary operator expected
    /etc/bash_completion.d/kldload: line 3: [: =: unary operator expected
    /etc/bash_completion.d/man: line 3: [: too many arguments
    /etc/bash_completion.d/net-tools: line 71: [: =: unary operator expected
    /etc/bash_completion.d/pkg_install: line 3: [: =: unary operator expected
    /etc/bash_completion.d/procps: line 26: [: =: unary operator expected
    /etc/bash_completion.d/procps: line 41: [: =: unary operator expected
    /etc/bash_completion.d/wireless-tools: line 3: [: =: unary operator expected
    1.01user 0.12system 0:01.15elapsed 97%CPU (0avgtext+0avgdata 13504maxresident)k
    0inputs+0outputs (0major+2673minor)pagefaults 0swaps

    $ sudo -i
    [sudo] password for twb:
    -bash: [: too many arguments
    -bash: [: =: unary operator expected
    -bash: [: =: unary operator expected
    -bash: [: =: unary operator expected
    -bash: [: =: unary operator expected
    -bash: [: too many arguments
    -bash: [: =: unary operator expected
    -bash: [: =: unary operator expected
    -bash: [: =: unary operator expected
    -bash: [: =: unary operator expected
    -bash: [: =: unary operator expected
    root at elba:~# logout

I can raise this as a Debian BTS ticket if you think it's worth while.

I haven't done any investigation, but the errors sound like simple
inadequate quotation of unset variables.  Oh, silly me, those files
are in etc -- doubtless ones provided by Ubuntu packages rather than
the new bash-completion I cherry-picked from sid.

Strangely it doesn't happen when I just start my own bash:

    $ bash
    WARNING: sourcing .bashrc!
    twb at elba[Desktop]$ exit

    $ bash --version
    GNU bash, version 4.2.10(1)-release (arm-unknown-linux-gnueabi)
    Copyright (C) 2011 Free Software Foundation, Inc.
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

    This is free software; you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    $

A snapshot of my dotfiles (which should be current) are visible here:

    http://cyber.com.au/~twb/.profile
    http://cyber.com.au/~twb/.shrc
    http://cyber.com.au/~twb/.bashrc
    http://cyber.com.au/~twb/<et cetera>



More information about the Bash-completion-devel mailing list