[Bash-completion-devel] some patches

David Paleino dapal at debian.org
Sun Jun 12 05:42:30 UTC 2011


On Sat, 11 Jun 2011 23:43:15 +0200, Raphaël wrote:

> [..]
> 
> > > - a completion specific to the mysql client.
> > 
> > Added, with some minor modifications (in a couple of lines you used tabs
> > instead of four spaces), and with the usage of _parse_help instead of
> > hardcoding the options list.
> 
> I didn't use it because of:
> diff	\
>  <(mysql --help|grep -woE -- '--[a-z0-9-]+'|sort -u|grep -v
> 'variable-name')	\ <(_parse_help mysql|sort -u|sed s/=//)

Uhm.
Using:

  _parse_help mysql | sort -u | sed -e 's/=//;s/\.$//' | grep -v 'variable-name'

I see only added variables, apart from skip-comments and skip-ssl. We can
hardcode those two, I believe.

> [..]
> > > - the patch previously mentioned about mplayer, options list and i18n
> > 
> > I'm not entirely sure about this. I don't understand why LC_LANG can't be
> > used -- but usually "LANG=C command" works everywhere. If it works, I'd
> > prefer this way, since otherwise we should hardcode every language mplayer
> > is/will be translated to :)
> 
> I looked at the $(strings mplayer). English strings appears but it seems
> to be only the untranslated strings.
> The 'Name.*Min Max' string IS translated. It confirms what says
> mplayer's ./configure:
> 	  --language=lang		 default language to use [en]
> 	  (The LINGUAS environment variable is honored).
> Should we ask mplayer devs to put a hint character to help parsing ?
> or use sed 1,3d ? :)

I still can't understand.

What does "LANG=C mplayer -list-options" yield? If it's still french, then it
definitely is a mplayer bug :)

> I also forgot it above, I attached a completion for wget(1).

Again: mixed tabs and spaces. :/

"_parse_help wget" seems much better than "wget -h | sed -n
's/^[ [:blank:]]*\(-[a-zA-A46]\).*$/\1/p')" (remember that we prefer completing
long options)

I just woke up, and am unable to fully understand the COMP_WORDBREAKS (and
others) hackery done in the completion :)
So I'll just skip that now, and review it again ASAP (if no other team member
beats me at it :))

Kindly,
David

-- 
 . ''`.   Debian developer | http://wiki.debian.org/DavidPaleino
 : :'  : Linuxer #334216 --|-- http://www.hanskalabs.net/
 `. `'`  GPG: 1392B174 ----|---- http://deb.li/dapal
   `-   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/20110612/675f2161/attachment-0001.pgp>


More information about the Bash-completion-devel mailing list