2664 Commits

Author SHA1 Message Date
Guillaume Rousse
d2e8e66f09 fix optimisation (bug #312832), and explain the code 2010-11-16 23:05:08 +01:00
Guillaume Rousse
2b6f8de738 drop -o nospace option (fix #312831) 2010-11-16 22:32:13 +01:00
Ville Skyttä
c4eaba636f (testsuite) Add some perl module completion test cases (Alioth: #312832).
The -MFile::Sp and -MFile::Spec::Func test cases fail at the moment
but are not marked as expected failures, hoping for a quick fix for
the above bug ;)
2010-11-16 23:20:46 +02:00
Ville Skyttä
53062bbae2 Don't bother passing unused arg to _perlmodules(). 2010-11-16 22:59:36 +02:00
Ville Skyttä
5b8596231c Fix perl module colon completion trimming. 2010-11-16 22:47:31 +02:00
Ville Skyttä
88924b0cac Comment spelling fix. 2010-11-16 22:25:01 +02:00
Ville Skyttä
6934a508ef Test for availability of compopt before invoking it in _compopt_o_filenames().
Invoking it there on bash < 4 may cause terminal echo to be turned off for
some weird reason (RedHat: #653669).
2010-11-16 21:09:23 +02:00
Ville Skyttä
07f76d8f6c (testsuite) Fix cvs, cvsps, java, lftp, and wol fallout from commit c86b336. 2010-11-13 11:15:47 +02:00
Ville Skyttä
be5c8f4249 (testsuite) Ignore changed OLDPWD in xz.exp. 2010-11-13 10:51:31 +02:00
Freddy Vulto
6feb44ac0f (testsuite) Add missing dir to fixtures/acroread 2010-11-13 09:30:26 +01:00
Freddy Vulto
c86b336769 (testuite) Fix tests to run with autotools' make distcheck
File locations are prefixed with `$::srcdir' so that `make distcheck' can
execute the test suite using a relative path.

The current working directory is removed from the test-suite-bash-prompt.

Furthermore, no more dynamic creation of files in dir $::srcdir/fixtures since
this dir is read-only during `make distcheck'.  Instead create dynamic files in
$TESTDIR/tmp

The test suite uses these "directory" variables

   tcl            bash          description
   ------------   -----------   ------------------------------------
   $::srcdir      $SRCDIR       where `fixtures' reside, relative
   $::srcdirabs   $SRCDIRABS    where `fixtures' reside, absolute
   $::TESTDIR     $TESTDIR      where `runtest' is invoked, absolute
2010-11-12 23:35:36 +01:00
Ville Skyttä
8f0055553b Add/improve various autotools completions. 2010-11-12 21:56:40 +02:00
Guillaume Rousse
4162edf2c1 document COMP_IWLIST_SCAN variable 2010-11-07 21:30:37 +01:00
Guillaume Rousse
6a51790506 test perldoc options completion 2010-11-07 20:17:28 +01:00
Guillaume Rousse
4254f3a4a5 Switch back to a shell completion function for perl and perldoc
completions, using an external helper just for functions and modules
completions. This is overally slower, as our helper outputs all available
modules at once, rather than just one piece of namespace, but this is
more in line with other completions
2010-11-07 20:01:41 +01:00
Guillaume Rousse
fd8ade0077 rename perldoc helper to perl, as it is now a generic perl completion
handler, and use it for perl completion as well
2010-11-07 01:15:02 +01:00
Guillaume Rousse
2d58e69ef9 rework to match original bash function more closely, including options completion 2010-11-06 23:54:17 +01:00
Guillaume Rousse
1f0dd273f7 no need for usage output 2010-11-06 23:42:38 +01:00
Guillaume Rousse
83fc41d5b1 use same indentation convention as for bash code 2010-11-06 23:42:22 +01:00
Freddy Vulto
de51dd3a89 (testsuite) Prepend relative files with $::srcdir
in an attempt to be able to run the tests successfully from within
autotools' `make distcheck'.
2010-11-05 21:28:48 +01:00
Freddy Vulto
0367d0bf57 (testsuite) Moved tool_start() code to tool_init()
${tool}_start was called from within `config/default_exp', but this
proves to be error-prone, because DejaGnu isn't fully initialized at
that point, causing an error when calling one of the DejaGnu methods
pass/fail/unsupported/xfail/unresolved/untested:

    can't read "multipass_name": no such variable

The right way seems to be calling ${tool}_start() from
${tool}_init().
2010-11-05 21:11:57 +01:00
Ville Skyttä
b7937bf2f0 Simplify _screen_sessions(), use compgen -W, fixes partial completion. 2010-11-05 21:28:27 +02:00
Alexey Zaytsev
d68b471905 List both attached and detached sesstions for screen -x
Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
2010-11-05 21:09:08 +02:00
Ville Skyttä
8dc1e86a7a Don't source bash-completion.log when running "make check".
I wonder why does such a file end up in our completions dir, but it
looks like one created by "make check" invocations.
2010-11-05 19:47:25 +02:00
Ville Skyttä
ed3f21b013 Create and remove the test/{log,tmp} dirs when appropriate. 2010-11-05 19:46:53 +02:00
Ville Skyttä
46997c69c8 Don't bother creating the gzipped dist tarball, the bzip2 one is enough. 2010-11-05 18:52:19 +02:00
Ville Skyttä
6172ab4250 Remove autogen.sh, plain autoreconf (-i) is enough. 2010-11-05 18:46:56 +02:00
Freddy Vulto
edce099a45 (install) Fix relocated helpers dir 2010-11-04 22:40:53 +01:00
Freddy Vulto
325b1c2fea (testsuite) Added expected failure for perldoc options completion
perldoc options don't complete anymore
2010-11-03 22:34:35 +01:00
Freddy Vulto
99d8cf290d (testsuite) Fix comment 2010-11-03 22:06:12 +01:00
Freddy Vulto
8daa291d6a Split test in two for ls.exp, expanding ~part
Depending on if user has or hasn't an existing home dir, the test should
respond differently, but it's useful if both tests execute.
2010-11-03 22:00:12 +01:00
Ville Skyttä
642ef5344f Add basic growisofs completion. 2010-11-03 21:11:49 +02:00
Freddy Vulto
dfb84064a4 Fix _tilde with new _compopt_o_filenames 2010-11-03 19:55:38 +01:00
Ville Skyttä
7a174c0e1f Add ip completion (Debian: #600617). 2010-11-01 21:39:03 +02:00
Ville Skyttä
0f450219b6 Remove most "-o filenames" options to "complete".
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.
2010-11-01 19:29:45 +02:00
Ville Skyttä
494c44f5a3 Protect filenames with spaces within tar files. 2010-11-01 19:29:45 +02:00
Ville Skyttä
a58697d154 Comment update. 2010-11-01 19:29:45 +02:00
Ville Skyttä
1c28fa983d (testsuite) Test sftp -F with sftp instead of ssh. 2010-11-01 19:29:45 +02:00
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ä
ec82c536ed Improve javadoc -overview,-helpfile,-stylesheetfile,-link,-linkoffline completions. 2010-10-31 21:40:22 +02: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
Ville Skyttä
ff1a0565bc Fix indentation. 2010-10-31 20:59:53 +02:00
Ville Skyttä
9093ae293b Expose root command name from _root_command, add _complete_as_root helper. 2010-10-31 20:26:32 +02:00
Ville Skyttä
48438b2061 Move "compopt -o filenames" kludge to _compopt_o_filenames for easier reuse. 2010-10-31 20:14:56 +02:00
Ville Skyttä
f4c5d0c596 Add *.iso to mplayer, kaffeine, and dragon filename completions (Alioth: #311420).
xine-ui doesn't seem to support direct opening of *.iso files, so
split it and fbxine and aaxine from kaffeine and dragon completions.
2010-10-31 19:29:52 +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
Freddy Vulto
50dd6c7ac6 (testsuite) Test for expect-5.44 to prevent segfault
Modified test title
2010-10-31 07:53:15 +01:00
Freddy Vulto
bf763033b7 Merge branch 'master' of git+ssh://fvu-guest@git.debian.org/git/bash-completion/bash-completion 2010-10-26 22:42:37 +02:00
Freddy Vulto
20f7d5c1d2 (testsuite) Improve _filedir unicode test (Alioth #312477) 2010-10-26 22:41:01 +02:00
Ville Skyttä
7d45595493 Complete known hosts from avahi-browse only if $COMP_KNOWN_HOSTS_WITH_AVAHI is non-empty.
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).
2010-10-25 21:47:33 +03:00