[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#32154: [PATCH] getopt-long: Allow digit options.
From: |
Jan Nieuwenhuizen |
Subject: |
bug#32154: [PATCH] getopt-long: Allow digit options. |
Date: |
Sat, 14 Jul 2018 14:23:40 +0200 |
* module/ice-9/getopt-long.scm (short-opt-rx): Allow digits too. Allows
implementing `ls -1' command line.
---
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 14eaf8e23..c3e390168 100644
--- a/module/ice-9/getopt-long.scm
+++ b/module/ice-9/getopt-long.scm
@@ -222,7 +222,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.18.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#32154: [PATCH] getopt-long: Allow digit options.,
Jan Nieuwenhuizen <=