<div dir="auto">Ah, I didn't actually check the code --- I saw that the docs mentioned --color but they strongly imply that ; is *only* for long options. (Though what does that mean for -i versus --in-place? Maybe I should just try it and see what happens!)</div><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 11, 2018, 15:24 Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 12/11/18 4:09 PM, enh via Toybox wrote:<br>
> what's the right way to express an argument like sed's -iSUFFIX that takes an<br>
> _optional_ string argument? right now i'm struggling to think of a similar<br>
> option to copy & paste from...<br>
<br>
I'm not quite sure what you mean, but I implemented ; in lib/args to do optional<br>
argument values, and just fixed a cp.c bug where I wasn't handling the "not set"<br>
case properly?<br>
<br>
It's also used in --color for ls, a couple places in nsenter and unshare,<br>
skeleton.c demonstrates it...<br>
<br>
I _think_ it handles short arguments properly, but could easily have missed a<br>
case...<br>
<br>
Rob<br>
</blockquote></div>