[MPlayer-users] parse mplayer -list-options output with non-english LINGUAS

Raphaël raphael.droz+floss at gmail.com
Thu Jun 23 18:47:48 CEST 2011


Hi,

I post here about a discussion started here [1][2]:

- bash-completion currently strips the following lines in order to
extract the options list, roughly:
$ m{player,encoder} -list-options | sed -ne '1,/^[[:space:]]*Name/d' ...

- AFAICS this string "Name" is translated according the language selected at
compilation time.

- on, eg, Gentoo, mplayer's ./configure obeys $LINGUAS which may not contains 'en'

In such case, LANG=C mplayer -list-options always use internationalized
strings.

Do you think it would be safe to assume the completion
can strip the first 3 lines from mplayer output and the first 4 lines
from mencoder [3] ? or is there a better possibility around there ?
What would you think about putting a hint in the output to allow the use
of a more robust regexp ? or having the help header available in english when
LANG=C (whatever was the LINGUAS restriction during ./configure) ?



thank you


Raph


[1] http://lists.alioth.debian.org/pipermail/bash-completion-devel/2009-December/002318.html
[2] http://lists.alioth.debian.org/pipermail/bash-completion-devel/2011-June/003764.html

[3] I'm not quite sure if it is expected but, with mplayer
1.0_rc4_p20110322 and LINGUAS=fr:

$ mplayer -list-options|head -5

 Nom...

 ar...
 noar...
[ 3 lines before options output ]

$ mencoder -list-options|head -5
MEncoder SVN-r33094-4.5.2 (C) 2000-2011 MPlayer Team

 Nom...

 nofontconfig...
[ 4 lines before options output ]



More information about the MPlayer-users mailing list