diff options
author | Christopher Baines <mail@cbaines.net> | 2021-03-05 22:56:40 +0000 |
---|---|---|
committer | Christopher Baines <mail@cbaines.net> | 2021-03-06 00:18:30 +0000 |
commit | a8448da0f4a090818104e64dd79f90b0e50d5e77 (patch) | |
tree | 494c58b4724f12cd9de0db9b0a7096de2b922c0f /guix/scripts.scm | |
parent | 4f4b749e75b38b8c08b4f67ef51c2c8740999e28 (diff) | |
parent | a714af38d5d1046081524d859cde4cd8fd12a923 (diff) |
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/scripts.scm')
-rw-r--r-- | guix/scripts.scm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/guix/scripts.scm b/guix/scripts.scm index c9ea9f2e29..3aabaf5c9c 100644 --- a/guix/scripts.scm +++ b/guix/scripts.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2017, 2018, 2019, 2020, 2021, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Deck Pickard <deck.r.pickard@gmail.com> ;;; Copyright © 2015, 2016 Alex Kost <alezost@gmail.com> ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> @@ -118,7 +118,12 @@ procedure, but both the category and synopsis are meant to be read (parsed) by according to'string-distance'." (define (options->long-names options) (filter string? (append-map option-names options))) - (string-closest guess (options->long-names options) #:threshold 3)) + (match guess + ((? string?) + (match (string-split guess #\=) + ((name rest ...) + (string-closest name (options->long-names options) #:threshold 3)))) + (_ #f))) (define (args-fold* args options unrecognized-option-proc operand-proc . seeds) "A wrapper on top of `args-fold' that does proper user-facing error |