]> gitweb.factorcode.org Git - factor.git/commitdiff
tools.completion: don't use file-directory.
authorJohn Benediktsson <mrjbq7@gmail.com>
Tue, 23 Oct 2012 16:49:44 +0000 (09:49 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Tue, 23 Oct 2012 16:49:44 +0000 (09:49 -0700)
basis/tools/completion/completion.factor

index 4a0e6f88cd8319f17a51750dc3ff16e0c51823eb..60ca1e7beada44f26f26aa4b4c30604f4d5528ff 100644 (file)
@@ -121,7 +121,7 @@ PRIVATE>
 PRIVATE>
 
 : paths-matching ( str -- seq )
-    dup file-directory [ ?head drop trim-head-separators ] keep
+    dup last-path-separator [ 1 + cut ] [ drop "" ] if swap
     dup { [ exists? ] [ file-info directory? ] } 1&&
     [ directory-paths completions ] [ 2drop { } ] if ;