[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] getopt-long permits numbers for short options.
From: |
Janneke Nieuwenhuizen |
Subject: |
Re: [PATCH] getopt-long permits numbers for short options. |
Date: |
Tue, 05 Sep 2023 08:25:48 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Marius Bakke writes:
> * module/ice-9/getopt-long.scm (short-opt-rx): Add 0-9.
Hehe, reminds me of
https://lists.gnu.org/archive/html/bug-guile/2018-07/msg00009.html
> diff --git a/module/ice-9/getopt-long.scm b/module/ice-9/getopt-long.scm
> index 18b235390..0077183da 100644
> --- a/module/ice-9/getopt-long.scm
> +++ b/module/ice-9/getopt-long.scm
> @@ -221,7 +221,7 @@
> ((string=? "--" (car no)) (cons (reverse yes) (cdr no)))
> (else (loop (cons (car no) yes) (cdr no))))))
>
> -(define short-opt-rx (make-regexp "^-([a-zA-Z]+)(.*)"))
> +(define short-opt-rx (make-regexp "^-([a-zA-Z0-9]+)(.*)"))
> (define long-opt-no-value-rx (make-regexp "^--([^=]+)$"))
> (define long-opt-with-value-rx (make-regexp "^--([^=]+)=(.*)"))
FWIW, LGTM :)
Greetings,
Janneke
--
Janneke Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | AvatarĀ® https://AvatarAcademy.com