1541 Commits

Author SHA1 Message Date
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
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
Ville Skyttä
81b916effc Sort _command and _root_command targets. 2010-10-24 22:04:12 +03:00
Ville Skyttä
edd22493fe Add sha{,224,256,384,512}sum _longopt completions. 2010-10-24 22:01:50 +03:00
Ville Skyttä
82c5d5e2ef Sort _longopt targets. 2010-10-24 21:58:03 +03:00
Ville Skyttä
90f3b3dda0 Drop simple id completion, more thorough one is in completions/coreutils. 2010-10-24 21:54:13 +03:00
Ville Skyttä
b9b807e168 Drop simple passwd completion, more thorough one is in completions/shadow. 2010-10-24 21:43:48 +03:00
Ville Skyttä
5d7a13e05b Complete MAC addresses also from /etc/ethers. 2010-10-23 22:32:06 +03:00
Ville Skyttä
1b248b5502 Make mkdir complete only on dirs. 2010-10-23 14:36:11 +03:00
Ville Skyttä
d51ad46cd2 Improve _longopt --*=, --*dir*, --*file*, and --*path* completions. 2010-10-23 14:27:15 +03:00
Ville Skyttä
768bbc7858 Turn on -o filenames automatically also with _filedir -d. 2010-10-23 14:17:49 +03:00
Ville Skyttä
57720ee0be Treat --*path* like --*file* in _longopt(). 2010-10-23 14:15:32 +03:00
Ville Skyttä
245486b6df Add *.m2t and *.m2ts to xine-based player filename completions (Alioth: #312770). 2010-10-17 22:17:38 +03:00
Andrey G. Grozin
13e811b1f9 Add *.fb2 to okular filename completions. 2010-10-13 18:44:47 +03:00
Ville Skyttä
96c6416309 Make _parse_help() work with slash separated options. 2010-10-11 00:39:50 +03:00
Ville Skyttä
52bfcefb3d Simplify _parse_help somewhat. 2010-10-11 00:38:55 +03:00
Ville Skyttä
95399f638c Fix false posives for non-option words in _parse_help (Alioth: #312750, Stephen Gildea). 2010-10-11 00:01:51 +03:00
Ville Skyttä
cb6a9a4dfe Use "compgen -f" hack from _cd() instead of emulating -o filenames in _filedir().
See http://bugs.debian.org/272660#64 for more info about the hack.
2010-10-07 20:39:10 +03:00
Ville Skyttä
96b1594e4e Use "compopt -o filenames" if available instead of "compgen -f" hack in _cd(). 2010-10-07 20:37:06 +03:00
Ville Skyttä
4cd7c7c872 Treat *.spm as *.src.rpm.
Source rpms are sometimes named *.spm, e.g. in SUSE.
2010-10-07 20:05:55 +03:00
Ville Skyttä
27dab7e198 Allow setting option for creating output to parse in _parse_help().
Required in just added sysbench completion.
2010-10-06 00:01:00 +03:00
Freddy Vulto
e8d84b3004 Bugfix __reassemble_comp_words_by_ref
a b:c |<TAB> (with |=cursor) did not return `b:c' as `prev' on bash-4.1
(Alioth #312740)
2010-10-05 21:39:58 +02:00
Ville Skyttä
1da64f602a More known hosts IPv6 completion fixes, thanks to Yoshinori KUNIGA.
https://bugzilla.redhat.com/show_bug.cgi?id=630658#c4
2010-10-04 21:31:03 +03:00
Ville Skyttä
3d8efed618 Fixes to completions for filenames containing tabs (RedHat: #629518). 2010-10-04 20:49:17 +03:00
Ville Skyttä
66e35aa4a1 Use awk sub instead of gsub where appropriate. 2010-09-28 18:29:26 +03:00
Ville Skyttä
9341a1131c Fix known hosts completion for IPv6 addresses whose last 16 bits are digits (Alioth: #312695, RedHat: #630658). 2010-09-28 18:24:35 +03:00
Ville Skyttä
7ea7d7b268 Simplify filename completions per new _filedir(_xspec) uppercasing behavior. 2010-09-19 12:29:29 +03:00
Ville Skyttä
c183a585b2 Match uppercased versions of _filedir and _filedir_xspec arguments too.
This provides a bit of case insensivity to file extension matching,
allowing for example _filedir foo to match both *.foo and *.FOO.  Note
that this is not real case insensivity; mixed case extensions like
*.FOO.gz are not matched by _filedir foo.gz so those need to be
handled like before this change.
2010-09-19 12:12:06 +03:00
Ville Skyttä
8e23895fe5 Avoid stderr output from compopt when invoking _filedir directly.
The _filedir unit test currently does this, causing (harmless) error output.
2010-09-19 11:33:52 +03:00
Ville Skyttä
d2a551fad4 Combine identical xdvi and kdvi completions. 2010-09-18 20:51:51 +03:00
Ville Skyttä
0f426b0774 Drop bad kompare filename completion (Alioth: #312708). 2010-09-13 21:25:21 +03:00
Guillaume Rousse
ff6172097d symlinks are automatically dereferenced for -f test, so don't use -h test 2010-09-12 16:38:59 +02:00
Ville Skyttä
fa04cb8114 Add *.part to mplayer and xine-based player completions (Alioth: #312657). 2010-08-20 14:09:28 +03:00
Freddy Vulto
e846d84ed1 Fix _filedir to redirect only stderr 2010-08-20 11:28:19 +02: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
Guillaume Rousse
9b97b40c4a don't source Makefiles when run from test suite 2010-08-16 21:17:51 +02:00
Ville Skyttä
ff7c17e599 Trivial cleanups. 2010-07-01 20:21:35 +03:00
Freddy Vulto
66d3b63915 Speed up `compopt' availability detection.
Used `type compopt' instead of `compopt' to detect availability of
compopt because (at least on Ubuntu) a python-command-not-found handler
is started when issuing a non-existing command, thus resulting in
considerable slower completions on systems without compopt (bash < 4.0).
2010-06-30 23:40:13 +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ä
48027cfbe1 Add lr(un)zip completion. 2010-06-21 23:48:18 +03:00
Ville Skyttä
8346a428fc Add "short" tarball extensions to unxz, unlzma etc completions. 2010-06-21 23:32:22 +03:00
Freddy Vulto
a2fcc654e8 Refactored _filedir code to _quote_readline_by_ref
See also: http://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01944.html
2010-06-18 18:28:54 +02:00
David Paleino
f85f534727 Merge branch 'master' into 1.x 2010-06-11 11:12:11 +02:00
Freddy Vulto
94372b2aa6 Merge branch 'use-_get_comp_words_by_ref' 2010-06-10 23:51:30 +02:00
David Paleino
aab38f6160 Merge branch 'master' into 1.x 2010-06-10 08:49:28 +02:00
Freddy Vulto
0118ccb05a Remove verbose options from `_upvars'. 2010-06-10 00:03:07 +02:00
Freddy Vulto
a8dd58cfa9 Added _upvars' and _upvar'.
These helper methods aid in passing variables by reference.
2010-06-09 22:37:02 +02:00
Ville Skyttä
cdbfd8e224 Split ifup and ifdown completions into contrib/ifupdown. 2010-06-09 22:53:43 +03:00