2130 Commits

Author SHA1 Message Date
David Paleino
9a8fb49fe4 contrib/cpio: added missing completions for -?, --help, --license, --usage, --version and (-p) --to-stdout (Debian: #557436) 2009-11-22 08:22:58 +01:00
David Paleino
29f4b10890 Added colordiff completion, same as diff 2009-11-21 14:38:41 +01:00
Freddy Vulto
75969454c0 (testsuite) Make expected lists unique 2009-11-21 10:18:54 +01:00
Ville Skyttä
08c51bccbd Add style guide items for case label globbing and [[ ]] vs [ ]. 2009-11-20 22:54:44 +02:00
Freddy Vulto
2a506ec3f7 (testsuite) Set TERM=dummy only for non-cron
Err, TERM=linux also causes errors when tests are run via cron.
Reset TERM=dummy.
Workaround is to do a CRON=running from within the cron job and only set
TERM=dummy when not run via cron.
2009-11-18 23:45:16 +01:00
Ville Skyttä
2888874fa9 Testsuite: don't use pidof to check if avahi-daemon is running, cf. commit bb8912b06ff09f8fed253e7e5b14916e38a48733. 2009-11-18 23:33:06 +02:00
Freddy Vulto
1bb351e227 (testsuite) Set TERM=linux
The TERM=dummy setting causes backspaces (^H) to appear in stdout when running
from cron.  Changing to TERM=linux should fix the ^H's in stdout AND the bug of
`meta_on' or `meta_off' escape sequences in stdout, caused by a bug in
supposedly libreadline5:

http://old.nabble.com/-PATCH-:-fix-libreadline5-linked-applications-sending-meta_on-or-meta_off-to-stdout-td25557585.html

Steps to reproduce output of ^H with TERM=dummy:

    $ batch
    warning: commands will be executed using /bin/sh
    at> ./runUnit _known_hosts_real.exp --debug < /dev/tty40
    at> ^D

NOTE: You need to connect a terminal (< /dev/tty..) to the test suite
      when running from cron.  See also doc/testing.txt, "Running tests via
      cron".
2009-11-15 21:51:46 +01:00
Ville Skyttä
571e2fb7e1 Testsuite: avoid readline escape junk at beginning of line.
See e.g. http://bugs.gentoo.org/246091
2009-11-10 20:45:59 +02:00
Freddy Vulto
8a80987373 (testsuite) Improved removing cword from cmd
- Refactored code to new function `_remove_cword_from_cmd()'
- Added `cword' parameter to `assert_complete()' and `assert_complete_dir()':

    @param string $cword  (optional) Last argument of $cmd which is an
        argument-to-complete and to be replaced with the longest common
        prefix of $expected.  If empty string (default), `assert_complete'
        autodetects if the last argument is an argument-to-complete by
        checking if $cmd doesn't end with whitespace.  Specifying `cword'
        is only necessary if this autodetection fails, e.g.  when the last
        whitespace is escaped or quoted, e.g. "finger foo\ " or
        "finger 'foo "
2009-11-07 09:57:11 +01:00
Freddy Vulto
573844daa2 (testsuite) Test lftpget only if available 2009-11-07 09:28:14 +01:00
Ville Skyttä
36eb06af6b Extract CD/DVD completion from k3b into general functions, use them in mplayer. 2009-11-04 23:12:44 +02:00
Ville Skyttä
db7d2833df Indentation/linewrap fixes. 2009-11-04 00:24:28 +02:00
Ville Skyttä
41c675e749 sed usage portability fixes: avoid semicolon separated statements in one -e. 2009-11-04 00:16:06 +02:00
Ville Skyttä
ef46331012 Fix service argument completion. 2009-11-03 23:36:01 +02:00
Ville Skyttä
5b54c41de5 Fix javadoc, lvm, and mkinitrd (_count_args) local variable leaks. 2009-11-03 22:49:14 +02:00
Ville Skyttä
1ff30048fa Add trivial test cases for abook, lftpget, and wtf. 2009-11-03 22:47:35 +02:00
Ville Skyttä
c820944d2e Be stricter when finding long options in _longopt. 2009-11-03 22:28:10 +02:00
Ville Skyttä
93060b4133 Add k3b completion. 2009-11-03 22:24:41 +02:00
Ville Skyttä
a58062400d Note POSIX spec. 2009-11-03 22:14:44 +02:00
Ville Skyttä
4790b1a0c6 sed usage portability fixes: avoid \+ 2009-11-03 22:04:46 +02:00
Ville Skyttä
a17b2dbc73 Don't assume that apt-get, dpkg-deb, and dpkg-reconfigure are available. 2009-11-03 21:58:22 +02:00
Ville Skyttä
ac43cd55cb Indentation fixes. 2009-11-03 20:14:46 +02:00
Freddy Vulto
36bdc2ecad (testsuite) Updated doc "Running tests via cron" 2009-11-02 19:56:55 +01:00
Freddy Vulto
79cffa2d79 (testsuite) Make `configure' test pass 2009-11-02 19:42:03 +01:00
Ville Skyttä
ac644578e0 More compgen -W instead of embedding user input in sed/awk/grep fixes. 2009-11-01 21:01:18 +02:00
Ville Skyttä
3725168d8a Combine dcop and qdbus completions into the latter, they're the same. 2009-11-01 20:52:04 +02:00
Ville Skyttä
a6b227992e Drop unused compstr variable. 2009-11-01 20:45:59 +02:00
Ville Skyttä
6394f47a7c Add basic dir option argument completion for configure. 2009-11-01 20:41:57 +02:00
Freddy Vulto
988026a67e Merge branch 'fvu' 2009-11-01 10:09:18 +01:00
Freddy Vulto
6925ad5081 Mutt fixes
- Added support for `-F configfile'.  This enables using a specially
  crafted muttrc for automated testing.
- Centralized call to _get_cword
- Used _get_pword
- Specified non-wordbreak characters to _get_cword() & _get_pword() for
  bash-4.
- Added automated tests for -f and -A
- Fixed test suite's assert_complete() (test/library.exp) to drop only
  the last element
2009-11-01 10:04:06 +01:00
David Paleino
b4901c1f6e Added munindoc completion to contrib/munin-node, thanks to Tom Feiner (Debian: #553371) 2009-10-31 22:45:49 +01:00
Ville Skyttä
f1b3be2357 Drop compgen/complete option and bash version related global variables. 2009-10-31 14:40:24 +02:00
Ville Skyttä
d062d3b570 Fix "adr" typo in ssh -b completion, use one sed instead of two awk calls. 2009-10-31 14:24:01 +02:00
Ville Skyttä
503c224899 Don't hardcode path to ifconfig. 2009-10-31 14:16:39 +02:00
Ville Skyttä
29ee9fb3f9 Use _available_interfaces in route dev completion. 2009-10-31 14:08:43 +02:00
Ville Skyttä
82c2334e4c Add /sbin to $PATH when invoking ifconfig and iwconfig. 2009-10-31 14:05:19 +02:00
Ville Skyttä
50b4b8459f route(1) completion code cleanups. 2009-10-31 14:01:26 +02:00
Ville Skyttä
774d50a9c9 Install _route completion only when route is available, remove unneeded $UNAME test. 2009-10-31 13:59:41 +02:00
Ville Skyttä
46fa5c464b Add abook completion, based on work by Raphaël Droz. 2009-10-31 13:59:29 +02:00
Freddy Vulto
884c3f5af6 Fixes to _get_pword patch.
Changed the last `echo' to a `printf' to make completing `-n' or '-e'
come through.  Declaring a function local (break_index & word_start)
also doesn't work on my machine: the functions become visible global.  I
considered doing an unset -f at the end of __get_cword4, but I made them
global (__break_index & __word_start) because they're used so often.
2009-10-31 09:55:40 +01:00
Freddy Vulto
545750eb2c Added _get_pword() helper function.
Thanks to Sung Pae (Alioth #312030):
"This patch extends both __get_cword3() and __get_cword4() to accept an
additional integer argument that specifies how many places previous to
the current word the desired word resides, respecting any user
exceptions to COMP_WORDBREAKS."
2009-10-31 09:24:20 +01:00
Freddy Vulto
a55d311ae2 (testsuite) Moved unsetting COMPREPLY 2009-10-31 08:32:58 +01:00
Freddy Vulto
87de422e8b Merge branch 'fvu' 2009-10-30 17:20:03 +01:00
Freddy Vulto
820b7c2602 (testsuite) Fix _known_hosts_real
Clear COMPREPLY after test now that _known_hosts_real is appending
instead of setting COMPREPLY.
2009-10-30 17:18:43 +01:00
Ville Skyttä
1d74adc296 Fix sed error in qdbus completions containing slashes (Debian: 552631). 2009-10-29 19:15:53 +02:00
Guillaume Rousse
60ee2500bc Merge branch 'master' of git+ssh://git.debian.org/git/bash-completion/bash-completion 2009-10-27 10:45:15 +01:00
Guillaume Rousse
a923b86b82 wrap long lines 2009-10-26 11:13:00 +01:00
Guillaume Rousse
129c48b0a4 obsoletes items 2009-10-26 11:07:29 +01:00
David Paleino
e3ea415e13 Really add those two new commands to aptitude 2009-10-26 10:19:37 +01:00
David Paleino
79c7de608f Use more obscure coding :) 2009-10-26 09:44:27 +01:00