unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: 32154@debbugs.gnu.org
Subject: bug#32154: [PATCH] getopt-long: Allow digit options.
Date: Sat, 14 Jul 2018 14:23:40 +0200	[thread overview]
Message-ID: <20180714122340.3677-1-janneke@gnu.org> (raw)

* 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






             reply	other threads:[~2018-07-14 12:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-14 12:23 Jan Nieuwenhuizen [this message]
2020-05-18 10:09 ` bug#32154: This patch breaks tests and is irrelevant now Dale Mellor
2020-08-02 10:51 ` bug#32154: This issue is now dealt with by #42669 Dale Mellor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180714122340.3677-1-janneke@gnu.org \
    --to=janneke@gnu.org \
    --cc=32154@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).