Re: [PATCH 3/3] tests: always quote $LODEV

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 07 November 2016, Karel Zak wrote:
> On Mon, Nov 07, 2016 at 09:58:25AM +0100, Ruediger Meier wrote:
> > On Sunday 06 November 2016, Bernhard Voelker wrote:
> > > So what happens now when losetup is fed with ""?
> > > Wouldn't it be better to handle the error instead?
> >
> > Actually the failure is generally handled in terms that the test
> > will fail and exit 1.
>
> This is the basic idea of the tests; it would be nice to keep it
> simple and stupid :-)
>
> > the whole --help output on usage errors. I really hate that
> > auto-help feature. Don't understand why we are doing that instead
> > of just printing "unkown option" or "missing argument".
>
> I'd like to change it for v2.30.
>
> Optionally, it would be also nice to have a way how to suggest the
> correct option on typos. I like the way how git react on typos:
>
>         $ git cxmmit
>         git: 'cxmmit' is not a git command. See 'git --help'.
>
>         Did you mean this?
>             commit
>

This is nice, allthough for getopt(3) option parsing this functionality 
would IMO belong to getopt() itself. Like we have already this
 
$ mount --make
mount: option '--make' is ambiguous; 
possibilities: '--make-shared' '--make-runbindable' '--make-rprivate' ...

Maybe just patch gnulib/getopt?

BTW would be also very nice to ensure by design that --help, manpage and 
the actual commands are always synchron. For my own projects I've 
used "gengetopt" for this. Unfortunately it has some unfixed bugs and 
it seems unmaintained. One of my colleagues has a nice project "yuck" 
adressing this, http://www.fresse.org/yuck/ It's basically a 
replacement for gengetopt and help2man.

I could send a patch to introduce yuck in UL to see how it would look. 
Maybe I could also convince my colleague to add such generic 
option-guessing feature.

cu,
Rudi
--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux