Subject: [PATCH 0/2] DRAFT: Hint for options.

From: zimoun <[email-masked]>
Date: Fri, 15 Jan 2021 17:37:32 +0100

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