451 Commits

Author SHA1 Message Date
Freddy Vulto
ef8b4f2722 Fix perldoc completions to run without invoking autotools
Alioth #312729

See also:
http://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg02143.html
2010-10-31 23:20:19 +01:00
Ville Skyttä
a877567477 Improve relevance of many user/group completions, depending on context.
_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.
2010-10-31 21:28:44 +02:00
Freddy Vulto
83bcd69557 (testsuite) Fix _parse_help for LANG=POSIX
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).
2010-10-31 17:51:14 +01:00
Ville Skyttä
0f3a7ff2a5 Make man completion work with manpage names containing colons.
For example Perl module man pages often contain them.  While at it,
add a couple of unrelated man test cases.
2010-10-23 23:03:05 +03:00
Ville Skyttä
1b248b5502 Make mkdir complete only on dirs. 2010-10-23 14:36:11 +03:00
Ville Skyttä
049e32ae66 Add dirs-only rmdir test case. 2010-10-23 14:35:25 +03:00
Freddy Vulto
37f51b9df2 (testsuite) Removed changing locale within 'expect'
Changing the locale within an `expect' session might cause bash to exit.
See: http://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg02265.html
2010-10-18 22:29:59 +02:00
Ville Skyttä
f0cc5fc2a8 Add ether-wake completion. 2010-10-07 18:03:59 +03:00
Ville Skyttä
77b78b3723 Add sysbench completion. 2010-10-05 23:40:44 +03:00
Ville Skyttä
7f5c64e580 (testsuite) Add some [host]:port cases to known hosts related tests. 2010-09-28 17:59:31 +03:00
Ville Skyttä
372008342e (testsuite) Run sftp tests with fixtures/sftp data, comment fixes. 2010-09-28 17:55:51 +03:00
Ville Skyttä
7a85f76d01 (testsuite) Add basic ipmitool tests. 2010-09-23 22:43:13 +03:00
Freddy Vulto
ba419108b7 (testsuite) Comment multipass_name 2010-09-20 22:54:22 +02:00
Ville Skyttä
0fe7126818 (testsuite) Fix cd test when CDPATH is set. 2010-09-19 19:12:51 +03:00
Ville Skyttä
0ed0de3047 Add badblocks, dumpe2fs, e2freefrag, e2label, filefrag, and tune2fs completions. 2010-09-19 14:33:09 +03:00
Ville Skyttä
3b7ed98459 Add xmodmap and xrdb completions. 2010-09-14 21:01:17 +03:00
Guillaume Rousse
796f77ef22 rename 'contrib' directory to 'completions' 2010-09-12 16:44:39 +02:00
Guillaume Rousse
a3ae00956d add freerdp completion 2010-09-12 11:38:22 +02:00
Ville Skyttä
c78db545f5 Add iftop(8) completion. 2010-09-10 00:12:03 +03:00
Ville Skyttä
0630139697 Add POSIX sh completion. 2010-09-05 11:02:03 +03:00
Freddy Vulto
b867bcd64f Fix _filedir error message on bash-3
In case of `sudo cmd', _filedir might be triggered for a cmd not having a
complete command, hence `complete -p cmd' could yield an error. (Alioth
2010-08-18 23:01:26 +02:00
Freddy Vulto
7b67991c18 (testsuite) Fix ls test
Append slash (/) or space (" ") to completion depending on whether
`~user' home directory exists or not.
2010-07-02 07:06:32 +02:00
Freddy Vulto
ccbf141e13 Fix tilde (~) completion with _filedir
This fixes tilde completion when doing for instance `ls ~<TAB>'.  See
also: Alioth #312613.

Added _tilde() helper function.

Contrary to _expand() and __expand_tilde_by_ref(), _tilde() also leaves the
tilde (~) intact.  Replacement of the tilde has been a complaint in other
bugreports, especially since plain bash completion (without bash-completion
installed) doesn't expand the tilde when doing a `ls ~<TAB>'.

To run the tests:

    ./run completion/ls.exp
    ./run unit/_tilde.exp
2010-06-30 23:28:31 +02:00
Ville Skyttä
6571c6685c Add sqlite3 option completions, include *.db in filename ones (Alioth: 312605). 2010-06-29 19:30:32 +03:00
Ville Skyttä
2e95443e14 (testsuite) Drop ending block comments. 2010-06-22 00:07:21 +03:00
Ville Skyttä
48027cfbe1 Add lr(un)zip completion. 2010-06-21 23:48:18 +03:00
Freddy Vulto
51b3e20ebc (testsuite) Drop ending block comments
Instead of writing `}; # if', write just `}' as was discussed here:

    http://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01815.html
2010-06-18 17:21:38 +02:00
Ville Skyttä
6ac176ec72 Add crontab completion. 2010-06-18 00:24:04 +03:00
Ville Skyttä
c858043cbc Add basic tests for hping2. 2010-06-16 20:34:08 +03:00
Ville Skyttä
887361302b Split ipsec completion into contrib/ipsec. 2010-06-09 22:50:33 +03:00
Ville Skyttä
3f1f6120d7 Split killall, pkill, pgrep and related completions into contrib/procps. 2010-06-09 22:47:42 +03:00
Ville Skyttä
bf0ec3ce0e Split chown, chgrp, and id completions into contrib/coreutils. 2010-06-09 22:33:25 +03:00
Ville Skyttä
5022808775 Fix MAC address completion. 2010-05-11 00:35:45 +03:00
Ville Skyttä
310eb69245 Add wol(1) completion.
May need a bit of work, see failing test case ("wol 00:").
2010-05-10 00:57:16 +03:00
Ville Skyttä
e69af25547 Add -context to find(1) options. 2010-05-08 00:18:40 +03:00
Mario Schwalbe
95648c40c5 Update find(1) completion (Alioth: #312491). 2010-05-08 00:10:07 +03:00
Ville Skyttä
0a0d73ff72 (testsuite) Fix cpio -R test on boxes with lots of users. 2010-04-26 23:49:47 +03:00
Ville Skyttä
818995dc2b (testsuite) chsh: test shell completion, fix test on boxes with lots of users. 2010-04-26 23:42:19 +03:00
Ville Skyttä
38e836f82b Fix kldunload test failure when no modules are loaded. 2010-04-26 22:59:15 +03:00
Ville Skyttä
6301ee273b Fix finger test failure when _known_hosts_real returns duplicates. 2010-04-26 21:58:14 +03:00
Ville Skyttä
9c9df7f2b7 Add pkgtools fixture, test port{upgrade,install} and pkg_deinstall against it. 2010-04-26 21:36:04 +03:00
Freddy Vulto
59e7d21e09 (testsuite) Fix screen accessing $::BASH_VERSINFO 2010-04-26 19:53:13 +02:00
Freddy Vulto
827ad88ebb (testsuite) Expand PATH with 'sbin' directories
This allows for testing completions of system administrator commands,
which are installed via the same PATH expansion in
`bash_completion.have()'
2010-04-22 22:22:50 +02:00
Ville Skyttä
be649e63be Set cancel test outcome to untested, not unresolved if adding a test job fails.
E.g. lp installed, but lpd not running which is not a rare scenario.
2010-04-21 20:30:49 +03:00
Ville Skyttä
1267cf8bd2 Add some more missing basic testcases. 2010-04-21 19:45:33 +03:00
Ville Skyttä
38e9ef18b2 Fix leak of $arg from hcitool and cryptsetup completions. 2010-04-21 19:25:02 +03:00
Ville Skyttä
1017a085a9 Add bunch of missing basic testcases. 2010-04-21 19:20:35 +03:00
Ville Skyttä
807ddd4105 lzma groks *.tlz. 2010-04-21 19:12:05 +03:00
Ville Skyttä
e270eb18e3 Improve filesystem type completions. 2010-04-21 19:07:17 +03:00
Ville Skyttä
7fc1fa88a8 Fix handling of short xz options.
Was broken in 8f42adfa8d5e9fbbba9566d1b76d9f89667e6d98
2010-04-19 21:36:47 +03:00