Commit 8227e76 was failing on these `chown' tests in bash-4.1:
FAIL: Check preserve special chars in funky\ user:Debia<TAB>
FAIL: Check preserve special chars in funky\.user:Debia<TAB>
FAIL: Check preserve special chars in fu\ nky.user:Debia<TAB>
FAIL: Check preserve special chars in f\ o\ o\.\bar:Debia<TAB>
FAIL: Check preserve special chars in foo\_b\ a\.r\ :Debia<TAB>
because a removal pattern is expanded:
$ a=\\b
$ w=\\
$ echo ${a#$w} # Doesn't work
\b
$ echo ${a#"$w"} # Ok
b
Prohibit word creation of characters if they're excluded from
$COMP_WORDBREAKS. For example, with ':' included in $COMP_WORDBREAKS,
'a b:' should split to 'b' and ':'. With ':' excluded from
$COMP_WORDBREAKS, 'a b:' should split to 'b:', NOT 'b' and ':'.
If we have a completion installed for the actual command invoked via
sudo etc, it is very much possible and fine that no completions are
returned from it, and doing _filedir in these cases is not the right
thing to do.
We don't need to do "complete -o filenames ..." when installing
bash-completion completions any longer (they should be handled
"internally"), but there are external completions which do that and
need it in effect also when completing with nice, sudo and friends.
Turn it on dynamically when needed instead; see doc/styleguide.txt for
a longer explanation. This fixes many non-filename completions which
had been previously more or less broken due to unwanted
escape-as-filenames behavior.
_usergroup now has a -u option, and there are new _allowed_users and
_allowed_groups helpers. These can be used to limit returned users
and/or groups to ones that the user has access to (or should be
assumed to have access to if running a "root command").
I had to remove a couple of "funky user" chown test cases because for
some reason they were broken by this change, I didn't immediately find
out why, and I couldn't come up with a valid use case that should be
supported for them that would be more beneficial than the relevance
improvements in this patch.
This effectively turns off avahi-browse by default; doing it by
default is not worth it compared to the number of various (mostly
slowness) problems it has caused people, for example Alioth #312691
and RedHat #630326.
Mandriva has applied a similar patch for some time already, although
their environment variable name was different ($COMP_AVAHI_BROWSE).