~ chicken-core (chicken-5) aabc5bec18c51a3575896e43686ac937674b0328


commit aabc5bec18c51a3575896e43686ac937674b0328
Author:     felix <felix@call-with-current-continuation.org>
AuthorDate: Tue Jul 27 13:28:44 2010 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Tue Jul 27 13:28:44 2010 +0200

    added -exact to chicken-status

diff --git a/chicken-status.scm b/chicken-status.scm
index 35ac16d8..7859672d 100644
--- a/chicken-status.scm
+++ b/chicken-status.scm
@@ -104,6 +104,7 @@ usage: chicken-status [OPTION | PATTERN] ...
   -h   -help                    show this message
   -v   -version                 show version and exit
   -f   -files                   list installed files
+       -exact                   treat PATTERN as exact match (not a pattern)
        -host                    when cross-compiling, show status of host extensions only
        -target                  when cross-compiling, show status of target extensions only
 EOF
@@ -113,12 +114,21 @@ EOF
   (define *short-options* '(#\h #\f))
 
   (define (main args)
-    (let ((files #f))
-      (let loop ((args args) (pats '()))
+    (let ((files #f)
+	  (exact f))
+      (loop ((args args) (pats '()))
 	(if (null? args)
 	    (let ((status
 		   (lambda ()
-		     (let* ((patterns (if (null? pats) '(".*") pats))
+		     (let* ((patterns
+			     (map
+			      regexp
+			      (cond ((null? pats) '(".*"))
+				    ;;XXX change for total-irregex branch:
+				    (exact (map (lambda (p)
+						  (string-append "^" (regexp-quote p) "$"))
+						pats))
+				    (else pats))))
 			    (eggs (gather-eggs patterns)))
 		       (if (null? eggs)
 			   (print "(none)")
diff --git a/manual/Extensions b/manual/Extensions
index 1a8882ca..59900651 100644
--- a/manual/Extensions
+++ b/manual/Extensions
@@ -606,6 +606,7 @@ Available options:
 ; {{-f   -files}} : list installed files
 ; {{-host}} : when cross-compiling, show extensions for host system only
 ; {{-target}} : when cross-compiling, show extensions for target system only
+; {{-exact}} : match extension-name exactly (do not match as pattern)
 
 
 === Security
Trap