]> gitweb.factorcode.org Git - factor.git/commitdiff
shell: using glob-directory.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 28 Mar 2016 01:52:45 +0000 (18:52 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 28 Mar 2016 01:52:45 +0000 (18:52 -0700)
extra/shell/shell.factor

index 9ed10ee45d70f218bb03fb6ea72a0dc01de91b4d..2990bc6b874cd3236bebefef0428496d8b2842af 100644 (file)
@@ -1,5 +1,5 @@
-USING: accessors continuations debugger environment eval io
-io.directories io.encodings.utf8 io.launcher io.pathnames
+USING: accessors continuations debugger environment eval globs
+io io.directories io.encodings.utf8 io.launcher io.pathnames
 io.pipes kernel namespaces sequences sequences.deep shell.parser
 splitting words ;
 IN: shell
@@ -22,10 +22,7 @@ M: double-quoted-expr expand expr>> ;
 
 M: variable-expr expand expr>> os-env ;
 
-M: glob-expr expand
-    expr>> dup "*" = [
-        drop current-directory get directory-files
-    ] when ;
+M: glob-expr expand expr>> glob-directory ;
 
 M: factor-expr expand expr>> eval>string ;