When completing commands, don't insert executable suffixes.
authorChris Hanson <org/chris-hanson/cph>
Fri, 23 Oct 1998 05:50:20 +0000 (05:50 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 23 Oct 1998 05:50:20 +0000 (05:50 +0000)
v7/src/edwin/shell.scm

index b0933f6f3b5b9d301b15ff37efc0e7eaee46ab5d..4a61d54b0673164563f00e6d8c1b53ed12735a8a 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: shell.scm,v 1.16 1998/08/30 02:43:59 cph Exp $
+$Id: shell.scm,v 1.17 1998/10/23 05:50:20 cph Exp $
 
 Copyright (c) 1991-98 Massachusetts Institute of Technology
 
@@ -436,7 +436,12 @@ those that effect file completion."
     (cond ((null? results)
           (if-not-found))
          ((null? (cdr results))
-          (if-unique (car results)))
+          (if-unique
+           (let ((result (car results)))
+             (let ((t (pathname-type result)))
+               (if (memq t (os/executable-pathname-types))
+                   (->namestring (pathname-new-type result #f))
+                   result)))))
          (else
           (if-not-unique (compute-max-prefix results) (lambda () results))))
     (not (null? results))))