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.
Steps to reproduce the problem:
$ LANG=POSIX ./run unit/_parse_help.exp
...
Running ./unit/_parse_help.exp ...
FAIL: short + long
FAIL: short + long, slash separated
Cause:
When comparing list items, `assert_bash_list()' expects the real list to be
sorted, whereas the output of `_parse_help' is unsorted.
These particular two tests were failing because they suffered the
following LANG-dependant sort-difference:
$ cat t.txt
-m
--n
$ LANG=en_US.UTF-8 sort t.txt
-m
--n
$ LANG=POSIX sort t.txt
--n
-m
Solution:
Made to default for `assert_bash_list' more-intuitive: unsorted, and added an
option `-sort' to explicitly enable sorting.
I felt uncomfortable adding yet another optional argument, so I seized this
opportunity to move subsequent optional arguments to single optional arguments.
E.g.:
assert_bash_list {expected cmd {test ""} {prompt /@} {size 20}} {
has now become:
# ...
# @param list $args Options:
# -nosort Compare list unsorted. Default is sorted
# -prompt Bash prompt. Default is `/@'
# -chunk-size N Compare list N items at a time. Default
# is 20.
assert_bash_list {expected cmd test {args {}}
(and the `test' argument has become mandatory).
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).