[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#45893] [PATCH 0/2] DRAFT: Hint for options.
From: |
zimoun |
Subject: |
[bug#45893] [PATCH 0/2] DRAFT: Hint for options. |
Date: |
Tue, 19 Jan 2021 18:35:49 +0100 |
Hi Ludo,
On Tue, 19 Jan 2021 at 18:20, Ludovic Courtès <ludo@gnu.org> wrote:
> zimoun <zimon.toutoune@gmail.com> skribis:
>
> > * guix/scripts/search.scm (define-command): Replace 'args-fold*' by
> > 'parse-command-line'.
> > * guix/scripts/show.scm (define-command): Replace 'args-fold*' by
> > 'parse-command-line'.
>
> [...]
>
> > - (args-fold* args %options
> > - (lambda (opt name arg . rest)
> > - (leave (G_ "~A: unrecognized option~%") name))
> > - handle-argument
> > - '()))
> > + (parse-command-line args %options '()))
>
> In these two cases, you need to pass #:build-options? #f.
Ok. One question is: do we replace all the 'args-fold*' by
'parse-command-line' (with the correct arguments)? If yes, the
proposal works. Otherwise, the computation of the hint should be
moved to elsewhere. But where to avoid to duplicate code (replacing
args-fld* by parse-command-line in all guix/scripts/ fixes the issue).
Note that the "issue" is to handle the error. For example, if one
moves "option-hint" to "args-fold*" then the hint would not work for
all the commands.
What is your suggestion?
All the best,
simon
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., zimoun, 2021/01/15
- [bug#45893] [PATCH 1/2] scripts: search, show: Replace 'args-fold*' by 'parse-command-line'., zimoun, 2021/01/15
- [bug#45893] [PATCH v2 0/3] DRAFT: Hint command line typo, zimoun, 2021/01/15
- [bug#45893] [PATCH v2 1/3] scripts: search, show: Replace 'args-fold*' by 'parse-command-line'., zimoun, 2021/01/15
- [bug#45893] [PATCH v2 3/3] ui: Add command hint., zimoun, 2021/01/15
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., Ludovic Courtès, 2021/01/19
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., zimoun, 2021/01/19
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., Ludovic Courtès, 2021/01/26
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., zimoun, 2021/01/26
- [bug#45893] Hint for package name: too slow!, zimoun, 2021/01/19
- [bug#45893] Hint for package name: full matrix iteration, zimoun, 2021/01/20
- [bug#45893] [PATCH 0/2] DRAFT: Hint for options., Ludovic Courtès, 2021/01/26