https://projects.osmocom.org/https://projects.osmocom.org/favicon.ico?16647414092021-02-16T22:08:26ZOpen Source Mobile Communicationslibosmocore - Bug #5029: vty: optional cases with multiple arguments is undefined behaviourhttps://projects.osmocom.org/issues/5029?journal_id=213192021-02-16T22:08:26Zfixeria
<ul></ul><p>I also faced this issue some time ago. The parser basically fails to handle constructions like:</p>
<pre>
command foo [zoo <0-123>]
</pre>
<p>so the only way (unless it's fixed) is to define two commands: with and without the optional part.</p> libosmocore - Bug #5029: vty: optional cases with multiple arguments is undefined behaviourhttps://projects.osmocom.org/issues/5029?journal_id=213392021-02-18T17:44:49Zpespin
<ul></ul><p>I think the cases you mention here are simply not supported, and I'm not sure if we want to support them (I'm not saying I'm against it).<br />In any case, I see it is strange cmd parsing doesn't fail currently if no "]" is find at the end of the param.</p>