fixing long-flag-with-optional-part in optparse.coffee, and hiding bin/node_coffee --watch until we implement it

This commit is contained in:
Jeremy Ashkenas
2010-02-14 20:50:45 -05:00
parent 7667e16732
commit 3e518e3cf9
4 changed files with 9 additions and 4 deletions

View File

@@ -14,7 +14,7 @@ SWITCHES: [
['-i', '--interactive', 'run an interactive CoffeeScript REPL']
['-r', '--run', 'compile and run a CoffeeScript']
['-o', '--output [DIR]', 'set the directory for compiled JavaScript']
['-w', '--watch', 'watch scripts for changes, and recompile']
# ['-w', '--watch', 'watch scripts for changes, and recompile']
['-p', '--print', 'print the compiled JavaScript to stdout']
['-l', '--lint', 'pipe the compiled JavaScript through JSLint']
['-e', '--eval', 'compile a string from the command line']

View File

@@ -59,8 +59,9 @@ build_rules: (rules) ->
# Build a rule from a short-letter-flag, long-form-flag, and help text.
build_rule: (letter, flag, description) ->
match: flag.match(OPTIONAL)
flag: flag.match(LONG_FLAG)[1]
{
name: flag.match(LONG_FLAG)[1].substr(2)
name: flag.substr(2)
letter: letter
flag: flag
description: description