unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [PATCH] getopt-long permits numbers for short options.
@ 2023-09-05  6:04 Marius Bakke
  2023-09-05  6:25 ` Janneke Nieuwenhuizen
  0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2023-09-05  6:04 UTC (permalink / raw)
  To: guile-devel

* module/ice-9/getopt-long.scm (short-opt-rx): Add 0-9.
---
 module/ice-9/getopt-long.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 "^--([^=]+)=(.*)"))
 
-- 
2.41.0




^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-09-05 11:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-05  6:04 [PATCH] getopt-long permits numbers for short options Marius Bakke
2023-09-05  6:25 ` Janneke Nieuwenhuizen
2023-09-05 11:08   ` Dale Mellor
2023-09-05 11:58   ` Marius Bakke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).