2016-05-28 4 views
0

Wie erhalten Sie nur eine Zeile mit der Ulmenversion?elm: wie bekommt man nur eine linie mit der elm-version?

Vorerst ich dieses:

$ 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> 
$ 

Antwort

2
elm-make --version 2>&1 | head -n 1 

nicht sicher, ob die Umleitung unbedingt erforderlich ist; Einige Tools werden in diesem Szenario einfach auf stdout gedruckt.

3

Zwei der anderen Werkzeuge in der Elm-Plattform druckt nur die Version (zumindest für mich auf OSX Elm 0.17.0):

% elm reactor --version 
0.17.0 
% elm repl --version 
0.17.0 
Verwandte Themen