This utility is very useful, but it seems unable to handle passing in
file names with spaces in them.

Example program:

;--------- begin args.clj
(ns args
  (:use clojure.contrib.command-line))

(with-command-line *command-line-args*
  "args -- test of args"
  [filenames]
  (doseq [filename filenames]
        (prn filename)))
;---------- end args.clj

I run the program like this:
> clj args.clj ~/src/no_spaces.txt "~/file with spaces.txt"

And the results are this:

"/Users/smith/src/no_spaces.txt"
"~/file"
"with"
"spaces.txt"

When they should be this:

"/Users/smith/src/no_spaces.txt"
"~/file with spaces.txt"

--Kevin Albrecht

P.S. Also, unrelated to this problem, the following line in the
example code in command_line.clj is missing the vector surrounding the
bindings of the doseq:

      :else   (doseq filename filenames
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To post to this group, send email to clojure@googlegroups.com
To unsubscribe from this group, send email to 
clojure+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/clojure?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to