1785 Commits

Author SHA1 Message Date
Ville Skyttä
aa45595251 Add /sbin to $PATH when invoking lspci and lsusb. 2009-09-20 18:33:24 +03:00
Freddy Vulto
f733e71e1f Split _get_cword into bash-3/4 versions
- Added code comments to _get_cword, __get_cword3 & __get_cword4
- (testsuite) Added tests for _get_cword
- (testsuite) Bugfixes assert_bash_exec() && match_items()

Bash-4 splits COMP_WORDS using characters from COMP_WORDBREAKS, but has
a bug where quoted words are also splitted, see:
http://www.mail-archive.com/bug-bash@gnu.org/msg06095.html

__get_cword3 is used for bash-2/3 and __get_cword4 is used for bash-4.
__get_cword4 handles well temporarily disabling of COMP_WORDBREAK
characters, but fails quoted words (a 'b c) and subshells (a $(b c).
See the expected failures when running the automated tests.
__get_cword3 does a better job of returning quoted words.

To run the automated tests on bash-3/4:

    $ ./runUnit _get_cword.exp [--tool_exec <path to bash-3/4 binary>]
2009-09-20 14:11:26 +02:00
Freddy Vulto
fcf2bf91c9 (testsuite) Added `stdout' to assert_bash_exec()
Added support to assert_bash_exec() to retrieve bash output within
tcl/expect.
2009-09-20 13:07:04 +02:00
Freddy Vulto
fc3f65e6dd (testsuite) Supported specifying bash binary
Using option `--tool_exec' you can now specify which bash binary you
want to use:

    $ ./runUnit --tool_exec /opt/bash-4/bin/bash
    $ ./runCompletion --tool_exec /opt/bash-4/bin/bash

If not specified, current `bash' as found in the tcl path (/bin/bash)
will be used.
2009-09-20 12:59:08 +02:00
David Paleino
679a87d91b Revert "Added completion for lintian/lintian-info"
This reverts commit c200e468d61b88bcf4d14253daf42c066929bfa9.

Filing the completion to the proper package, don't keep it in
upstream's bash-completion
2009-09-19 00:53:24 +02:00
David Paleino
c200e468d6 Added completion for lintian/lintian-info 2009-09-18 23:59:41 +02:00
David Paleino
f061b21ef9 Clean [1.2.3.4]:port format in known_hosts, thanks to Xuefer (Gentoo: #284563) 2009-09-17 23:05:52 +02:00
David Paleino
3a69bd3e93 Improve service(8) completion, also look for "msg_usage" (thanks to Elan Ruusamäe <glen@delfi.ee>) 2009-09-17 22:24:21 +02:00
David Paleino
f13ea4968b Avoid sed pipe as ps itself can omit the headers (thanks to Elan Ruusamäe) 2009-09-17 22:20:29 +02:00
David Paleino
7bc1813148 Revert "Support "man cmd subcmd" completion in contrib/man (Debian: #545411)"
This reverts commit 584bc520dfbc0e6a7e949b885bb9b949f99a1ff9.

This commit broke "general" man completion, trying to give "pages"
(from man-pages(7)) after $ man |. This would've been ok only if
$ man man | (man man pages indeed works). Trying to look for a fix :)
2009-09-17 18:25:25 +02:00
David Paleino
584bc520df Support "man cmd subcmd" completion in contrib/man (Debian: #545411) 2009-09-17 18:06:24 +02:00
Freddy Vulto
046f2abc6f (testsuite) Tighten `match_items()'
An item now must match at the beginning of the line, to prevent
mismatches.
2009-09-16 23:17:56 +02:00
Freddy Vulto
451b920377 Merge branch 'fvu' 2009-09-16 22:22:07 +02:00
Freddy Vulto
171fc0e3c6 (testsuite) Added more tests for _get_cword
To run the tests:

   cd test && ./runUnit _get_cword.exp
2009-09-16 22:20:15 +02:00
Freddy Vulto
fe88919de4 (testsuite) Fix assert_env_unmodified() & get_hosts_avahi()
assert_env_unmodified() now calls `diff_env' with `LAST-ARG' as the last
argument.  Now $_ becomes `LAST_ARG' and $_ doesn't interfere with the
diff anymore as it would if $_ was the sed script.

Added line continuation (\) to bash script of `get_hosts_avahi()'.
2009-09-16 22:14:53 +02:00
Freddy Vulto
c6a8b856de (testsuite) set +o history for bash < 3.2.41
Bash < 3.2.41 has a bug where 'history' disappears from SHELLOPTS
whenever a shopt setting is sourced or eval'ed.  Disabling 'history'
makes it not show in tests "Environment should not be modified"
for bash < 3.2.41.
Added helper function `is_bash_version_minimal()' to
test/lib/library.sh.
2009-09-16 22:05:23 +02:00
David Paleino
0b35bdb5af Fixed obvious brokenness (typos) in contrib/mdadm 2009-09-16 20:33:53 +02:00
David Paleino
796a7f4e37 Added sshfs completion (shares the same as scp) (Debian: #545978) 2009-09-16 14:23:22 +02:00
David Paleino
0a727a5cdc Add changelog line for commit 3fe193f81a3e 2009-09-16 14:21:08 +02:00
David Paleino
f86fa99740 Added changelog line for commit 1421e55 2009-09-16 12:59:34 +02:00
David Paleino
7e379590b2 Improve qemu completion (Debian: #534901) 2009-09-16 12:53:23 +02:00
David Paleino
86d6d20cb0 Added m4v completion to mplayer (Debian: #504213) 2009-09-16 12:16:56 +02:00
Guillaume Rousse
3649c03967 additional comments about the goal of the script 2009-09-15 00:27:47 +02:00
Guillaume Rousse
f262487650 fix typo 2009-09-15 00:23:26 +02:00
Guillaume Rousse
8e496adff3 initial import 2009-09-14 23:01:19 +02:00
Guillaume Rousse
5b760a88bb add mdam and resolvconf completion to installed files list 2009-09-14 21:49:44 +02:00
Guillaume Rousse
3e1508e51e initial import 2009-09-14 21:48:44 +02:00
Guillaume Rousse
a1ae571cea initial import 2009-09-14 21:48:03 +02:00
Guillaume Rousse
c4b81f782d Merge branch 'master' of git+ssh://git.debian.org/git/bash-completion/bash-completion 2009-09-14 21:36:44 +02:00
Guillaume Rousse
6c62b8fb32 initial import 2009-09-14 21:32:06 +02:00
Freddy Vulto
8eaf5a1c2a Updated CHANGES 2009-09-13 21:29:35 +02:00
Freddy Vulto
03526772fa Fixes testsuite:
- Fix get_hosts_avahi() if avahi-browse not available
- Removed test "Tab should complete hostnames" from finger since it's
  returning (for the moment) undetectable ip-addresses from known_hosts
  files.  Furthermore the next test "Tab should complete partial
  hostname" is testing the same.
2009-09-13 18:05:58 +02:00
Freddy Vulto
5999df7fea Merge branch 'master' into fvu 2009-09-13 13:32:14 +02:00
Freddy Vulto
4467ce1725 Fix completion test for dpgk -L 2009-09-12 22:31:10 +02:00
Freddy Vulto
0e1e189f0b Fix leaking $muttcmd from mutt completion 2009-09-12 21:54:17 +02:00
Ville Skyttä
2c82de1a57 Add Fedora/RHEL/CentOS dependency install info. 2009-09-09 19:03:07 +03:00
Ville Skyttä
c31daf26ae Fix sbcl file/dirname completion (Debian: #545743). 2009-09-09 18:54:18 +03:00
Ville Skyttä
bb43fd63bf Split yum into _yum and yum-arch.
The plan is to move yum completion to yum upstream soon:
http://lists.baseurl.org/pipermail/yum-devel/2009-August/005777.html
2009-09-08 20:28:51 +03:00
Ville Skyttä
81458b0b9f Add yum --enable/disableplugin completions. 2009-09-08 20:20:48 +03:00
Ville Skyttä
603ed0acce Use --asciidoc-opts="--unsafe" instead of --unsafe for a2x for compatibility with asciidoc < 8.4.5. 2009-09-08 00:08:31 +03:00
Freddy Vulto
e663e1cbc0 Reverted _get_cword
`_get_cword' is reverted to before commit f6497298.
This fixes unittest:

    "a b:c| with WORDBREAKS -= : should return b:c"
    (| = cursor position)

notably by restoring passing an argument to _get_cword to omit
characters from $COMP_WORDBREAKS.

At the end of `get_cword', `echo "$cur"' has been changed to `printf
"%s" "$cur"'.  This fixes unittest:

    "a -n| should return -n"
    (| = cursor position)
2009-09-07 00:30:09 +02:00
Freddy Vulto
e20a4cb06e Added unit tests for _get_cword
These are the tests (| = cursor position):
1.  a b| should return b
2.  a | should return nothing
3.  a b|c should return b
4.  a b\ c| should return b\ c
5.  a 'b c| should return 'b c
6.  a "b c| should return "b c
7.  a b:c| should return c
8.  a b:c| with WORDBREAKS -= : should return b:c
9.  a -n| should return -n

Tests 5 & 6 yield "expected failures", see bugreport:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474094 .  At a first glance
this bugreport contains useful ideas, so anyone willing to try to make tests 5 &
6 pass, be sure to have a look there first.

To run the automated tests:

    $ cd test && ./runUnit _get_cword.exp
2009-09-07 00:26:27 +02:00
Ville Skyttä
b5505959af Don't hardcode path to lsmod. 2009-09-06 18:51:00 +03:00
Ville Skyttä
47fb2d8f0e Revert "Improve sudo completion (Alioth: #311414)."
This reverts commit 11d4d978876ceb58eaec5dcfd82fae7b9699acfd.
Avoiding breaking completion for the sudo'd command isn't as
straightforward as I thought.
2009-09-05 00:26:48 +03:00
Freddy Vulto
de585f387d Fix _known_hosts_real() to not glob awk script
See also bugreport Alioth #311614.

Added tests for the awk script processing IP numbers.  To run the tests:

   cd test
   ./runUnit _known_hosts_real.exp
   ./runCompletion ssh.exp scp.exp sftp.exp
2009-09-04 23:08:56 +02:00
Ville Skyttä
11d4d97887 Improve sudo completion (Alioth: #311414). 2009-09-04 23:59:34 +03:00
Ville Skyttä
8770727a08 Add xz and compress support to rpmbuild -t*/--tarbuild completion. 2009-08-26 23:58:50 +03:00
Ville Skyttä
2bef79059c Add more tarball filename extensions to rpmbuild -t*/--tarbuild completion. 2009-08-26 23:55:28 +03:00
Freddy Vulto
31f03cfb82 Fix for known_host files containing * character
Quote sed output ("\1") retrieving "GlobalKnownHostsFile/UserKnownHostsFile" to
prevent bash globbing of special characters, e.g. '*'.

Added unit test "Config file containing star (*) should work".
Added test library function `assert_bash_list()'.
To run unit tests:

    cd test && ./runUnit _known_hosts_real.exp
2009-08-23 09:38:19 +02:00
Freddy Vulto
9af88e6bd4 Fix unit test _known_hosts_real
Test "Empty COMP_KNOWN_HOSTS_WITH_HOSTFILE should omit HOSTFILE" now
includes hosts reported by avahi.
2009-08-18 21:28:43 +02:00