Am 08.03.2012 16:37, schrieb Vladimir 'φ-coder/phcoder' Serbinenko:
> On 08.03.2012 16:28, Lennart Sorensen wrote:
>> On Thu, Mar 08, 2012 at 04:18:05PM +0100, Vladimir 'φ-coder/phcoder'
>> Serbinenko wrote:
>>> We don't have to recreate whole GNU in GRUB either, we don't write
>>> an OS but a bootloader. In particular having -xfoo for isn't
>>> necessarry and moreover it will conflict with
>>> search -su<UUID>
>> So a 'short' option that looks like a 'long' option?
>>
>> Or is that -s and -u together?
> It's -s and -u together and so -s has no argument. With Andreas
> proposition "u" would be the argument
Btw, that's the POSIX/GNU proposition. ;)

>> Options can get confusing at times?
>>
>>> which is already used in the wild.
>>> The case of --long-option optional argument can be changed
>>> especially taking into account migration from 1.98 but -xfoo is
>>> probably out of the question.
>> I don't see how -xfoo where foo is a parameter for -x can work if you
>> support multiple short options being merged (which seems common in
>> GNU programs).
> You can if when encountering an option needing parameter you parse the
> rest as parameter. But then again optional parameter are tricky.
> Behaviour similar to other GNU is important but compatibility with
> previous version of GRUB is more so, especially when it comes to the
> rarely used features like -xfoo. 
That's the big misinterpretation done in the past: without being able to
handle "-xfoo" you'll not be able to handle optional arguments in a
proper way. So it's nothing about using a rarely used feature.

The guys writing the POSIX/GNU recommendation did a great job and they
knew exactly what they proposed and for what reasons.


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to