[Bash-completion-devel] Completing on comma-separated list
David Paleino
d.paleino at gmail.com
Sat Sep 19 07:30:10 UTC 2009
Hello people,
On Fri, 18 Sep 2009 22:54:49 +0000, David Paleino wrote:
> The following commit has been merged in the master branch:
> commit c200e468d61b88bcf4d14253daf42c066929bfa9
> Author: David Paleino <d.paleino at gmail.com>
> Date: Fri Sep 18 23:59:41 2009 +0200
>
> Added completion for lintian/lintian-info
>
> [..]
> +# -@(T|-tags))
> +# # This option wants a comma-separated list
> +# # Disabled because completion doesn't work right after the
> comma.
> +# compopt -o nospace lintian
> +# COMPREPLY=( $( compgen -S',' -W '$( grep
> ^Tag /usr/share/lintian/checks/*.desc | cut -d\ -f2 )' -- $cur ) )
> +# return 0
> +# ;;
lintian(1) (that's a Debian QA tool) expects a comma-separated list, and the
above completion fails.
Any idea how to accomplish this? The expected behaviour would be (| cursor, <>
tab):
$ lintian -T <>
tag1, tag2, tag3,
$ lintian -T tag1,<> # The first one gets correctly completed
tag1, tag2, tag3, # I don't really care whether it repeats "tag1"
$
While it currently does:
$ lintian -T <>
tag1, tag2, tag3,
$ lintian -T tag1,<>
$ lintian -T tag1,|
The same goes with some other options, which I didn't notice accepted a
comma-separated list (it doesn't matter whether there is a trailing comma, even
if it would be nice to drop it)
Any idea on how to achieve this?
Otherwise, I can offer completion just for the first item, then go back to
options completion.
Kindly,
David
--
. ''`. Debian maintainer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://snipr.com/qa_page
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20090919/e4dab44b/attachment.pgp>
More information about the Bash-completion-devel
mailing list