[Ml-yokadi] t_list Parser bug
Sébastien Renard
Sebastien.Renard
Mer 4 Fév 23:06:18 CET 2009
Le mercredi 4 février 2009, Sébastien Renard a écrit :
> Hello,
>
> This works:
> t_list --done=thisweek
>
> But this does not:
> t_list -d thisweek
>
> I think it's link to the "action" flag of parser.
>
> Don't have time to fix that today. I'll have a look till the end of the
> week.
>
> a+
Well, the problem was the dash escaping mechanism... OptionParser is tricky.
When a long option have a value (--done=thisweek for instance) it's not
recognized by get_option.
A simple fix is to escape only single dash, not double dash. I've just commit
it.
A smarter way would be to extract option (before =) and check if it is a real
option or user text. This is for another day ;-).
a+
--
Sébastien
Plus d'informations sur la liste de diffusion Ml-yokadi