tilt -V (return code: 1)
/usr/bin/tilt:82:in `eval': undefined local variable or method `ersion' for main:Object (NameError)
from /usr/bin/tilt:82:in `eval'
from /usr/bin/tilt:82:in `block (2 levels) in <main>'
from /usr/lib/ruby/2.3.0/optparse.rb:1578:in `block in parse_in_order'
from /usr/lib/ruby/2.3.0/optparse.rb:1534:in `catch'
from /usr/lib/ruby/2.3.0/optparse.rb:1534:in `parse_in_order'
from /usr/lib/ruby/2.3.0/optparse.rb:1528:in `order!'
from /usr/lib/ruby/2.3.0/optparse.rb:1620:in `permute!'
from /usr/lib/ruby/2.3.0/optparse.rb:1642:in `parse!'
from /usr/bin/tilt:89:in `block in <main>'
from /usr/lib/ruby/2.3.0/optparse.rb:2081:in `options'
from /usr/bin/tilt:41:in `<main>'
tilt --help (return code: 0)
Usage: tilt <options> <file>
Process template <file> and write output to stdout. With no <file> or
when <file> is '-', read template from stdin and use the --type option
to determine the template's type.
Options
-l, --list List template engines + file patterns and exit
-t, --type=<pattern> Use this template engine; required if no <file>
-y, --layout=<file> Use <file> as a layout template
-D<name>=<value> Define variable <name> as <value>
--vars=<ruby> Evaluate <ruby> to Hash and use for variables
-h, --help Show this help message
Convert markdown to HTML:
$ tilt foo.markdown > foo.html
Process ERB template:
$ echo "Answer: <%= 2 + 2 %>" | tilt -t erb
Answer: 4
Define variables:
$ echo "Answer: <%= 2 + n %>" | tilt -t erb --vars="{:n=>40}"
Answer: 42
$ echo "Answer: <%= 2 + n.to_i %>" | tilt -t erb -Dn=40
Answer: 42