Util-Linux package development
 help / color / mirror / Atom feed
From: Ruediger Meier <sweet_f_a@gmx.de>
To: Karel Zak <kzak@redhat.com>
Cc: Bernhard Voelker <mail@bernhard-voelker.de>, util-linux@vger.kernel.org
Subject: Re: [PATCH 3/3] tests: always quote $LODEV
Date: Mon, 7 Nov 2016 11:21:55 +0100	[thread overview]
Message-ID: <201611071121.55542.sweet_f_a@gmx.de> (raw)
In-Reply-To: <20161107094101.jit57km4ymbdumy6@ws.net.home>

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

  reply	other threads:[~2016-11-07 10:21 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-05 15:08 [PATCH 1/3] tests: udevadm settle before losetup -d Ruediger Meier
2016-11-05 15:08 ` [PATCH 2/3] tests: replace sleep by udevadm Ruediger Meier
2016-11-07 13:13   ` Stanislav Brabec
2016-11-05 15:08 ` [PATCH 3/3] tests: always quote $LODEV Ruediger Meier
2016-11-06 20:57   ` Bernhard Voelker
2016-11-07  8:58     ` Ruediger Meier
2016-11-07  9:41       ` Karel Zak
2016-11-07 10:21         ` Ruediger Meier [this message]
2016-11-07 11:37           ` Karel Zak
2016-11-07 12:48             ` Ruediger Meier
2016-11-07 13:38               ` Karel Zak
2016-11-07 13:52                 ` Karel Zak
2016-11-07  9:53 ` [PATCH 1/3] tests: udevadm settle before losetup -d Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201611071121.55542.sweet_f_a@gmx.de \
    --to=sweet_f_a@gmx.de \
    --cc=kzak@redhat.com \
    --cc=mail@bernhard-voelker.de \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox