Hi, For a clojar I'm writing <http://github.com/cldwalker/table>, I'd like to know a user's terminal width so I can resize output appropriately. All the following techniques, which work fine in a ruby repl, don't work in leiningen2:
$ lein repl user=> (System/getenv "COLUMNS") nil user=> (clojure.java.shell/sh "tput" "cols") {:exit 0, :out "80\n", :err ""} ; This is incorrect as my terminal width is 238 user=> (clojure.java.shell/sh "stty" "size") {:exit 1, :out "", :err "stty: stdin isn't a terminal\n"} The only thing that does work is if I `export COLUMNS`, something I don't have to do for a ruby repl. Thoughts on why none of these approaches work and what a correct one would be? Thanks, Gabriel -- 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 Note that posts from new members are moderated - please be patient with your first post. 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