]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/tools/echo/echo.factor
factor: words -> split-words, lines -> split-lines, fix errors
[factor.git] / extra / tools / echo / echo.factor
index 13401d87fdc616293397f7aa04437d42162c9f35..493c259fa423ada7a49e6c8e2ae8d88485e23252 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2011 John Benediktsson
 ! See http://factorcode.org/license.txt for BSD license
 
-USING: command-line io kernel namespaces sequences ;
+USING: command-line io kernel namespaces sequences splitting ;
 
 IN: tools.echo
 
@@ -9,7 +9,7 @@ IN: tools.echo
     [ first "-n" = ] keep over [ rest ] when ;
 
 : echo-args ( args -- )
-    -n? unwords write [ nl ] unless ;
+    -n? join-words write [ nl ] unless ;
 
 : run-echo ( -- )
     command-line get [ nl ] [ echo-args ] if-empty ;