1

How get just one line with the elm version ?

For now I get this:

$ elm-make --version
elm-make 0.17 (Elm Platform 0.17.0)

Usage: elm-make [FILES...] [--output FILE] [--yes] [--report FORMAT] [--warn]
                [--docs FILE] [--prepublish] [--prepublish-core]
  build Elm projects

Available options:
  -h,--help                Show this help text
  --output FILE            Write result to the given .html or .js FILE.
  --yes                    Reply 'yes' to all automated prompts.
  --report FORMAT          Format of error and warning reports (e.g.
                           --report=json)
  --warn                   Report warnings to improve code quality.
  --docs FILE              Write documentation to FILE as JSON.

Examples:
  elm-make Main.elm                     # compile to HTML in index.html
  elm-make Main.elm --output main.html  # compile to HTML in main.html
  elm-make Main.elm --output elm.js     # compile to JS in elm.js
  elm-make Main.elm --warn              # compile and report warnings

Full guide to using elm-make at <https://github.com/elm-lang/elm-make>
$
user3313834
  • 7,327
  • 12
  • 56
  • 99

3 Answers3

4

Two of the other tools in the Elm Platform print just the version (at least for me on OSX Elm 0.17.0):

% elm reactor --version
0.17.0
% elm repl --version
0.17.0
robertjlooby
  • 7,160
  • 2
  • 33
  • 45
3
elm-make --version 2>&1 | head -n 1

Not sure if the redirection is strictly necessary; some tools simply print to stdout in this scenario.

tripleee
  • 175,061
  • 34
  • 275
  • 318
1

As of version 0.18.0, the plain elm tool works:

$ elm --version
0.18.0
robx
  • 2,221
  • 1
  • 14
  • 31