> clojure --eval "(clojure-version)""1.10.0"
Or just type:
clojure
or:
clj
And it announces the version and starts a REPL – which is documented usage.
I think one of the “issues” here is that clojure / clj are scripts that have an inherent version behind them (clojure -Sdescribe) but the version of Clojure that they run with is context-dependent. deps.edn can specify any Clojure back to … Clojure 1.1 it seems:
seanc@DESKTOP-QU2UJ1N:~$ clojure -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.1.0"}}}'
Clojure 1.1.0
user=> *clojure-version*
{:major 1, :minor 1, :incremental 0, :qualifier ""}
user=>
Given that, I think that a –version option on clojure would be misleading since it is not reporting the version of the clojure / clj scripts.
Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email to clojure+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/CAN67zA0yrhNhfx2vwH%3D-oy1kbJPA0EyGwwvg%2BFX3kyV4tgz3Qg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/5cd24a6f.1c69fb81.bb91f.699f%40mx.google.com.
Having a helper for the version used in the second is possibly useful and would be happy to consider that. This could be done either in clojure.main (CLJ) or in the Clojure scripts (TDEPS). I guess I would probably lean towards the former.
To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/CAN67zA3AnBTjrXhURmHssZbW%2BQwZc%3DWADcT1fKNBPxNOO_nYfg%40mail.gmail.com.