GNU bug report logs -
#45893
[PATCH 0/2] DRAFT: Hint for options.
Previous Next
Reported by: zimoun <zimon.toutoune <at> gmail.com>
Date: Fri, 15 Jan 2021 16:38:01 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Hi,
The first patch uniformize. If this proposal is ok, then more Guix scripts
have to be replaced; so the v2 could do that.
The second patch is the interesting one. The naive implementation of Levenshtein
distance by recursion is enough here when memoize is applied. However, the 'car'
and 'cdr' is not in the Guix style, feedback welcome.
Maybe abuse of fold, again feeback welcome.
Well, the current result is:
--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix show --lead-paht hello
hint: Do you mean `load-path'?
guix show: error: lead-paht: unrecognized option
--8<---------------cut here---------------end--------------->8---
All the best,
simon
zimoun (2):
scripts: search, show: Replace 'args-fold*' by 'parse-command-line'.
guix: scripts: Add hint for option typo.
guix/scripts.scm | 58 +++++++++++++++++++++++++++++++++++++++++
guix/scripts/search.scm | 7 ++---
guix/scripts/show.scm | 8 ++----
3 files changed, 62 insertions(+), 11 deletions(-)
base-commit: c03875b0361f114634caeb54935fe37a9b7b05af
--
2.29.2
This bug report was last modified 4 years and 106 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.