Skip to content

Commit

Permalink
Added an option to disable terminal coloring at the js command line.
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Mar 1, 2010
1 parent a3d71f9 commit 1bf0bd1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/narwhal.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ parser.option('-d', '--debug', 'debug')
.inc();

parser.option('-v', '--verbose', 'verbose')
.help("verbose mode: trace module loads. \0bold(\0green(-vv\0)\0) for all 'require' calls.")
.help("verbose mode: trace module loads. \0bold(\0green(-vv\0)\0) for all 'require' calls")
.def(0)
.inc();

Expand All @@ -80,12 +80,18 @@ parser.option('-l', '--log', 'level')
.choices({'critical': 0, 'error': 1, 'warn': 2, 'info': 3, 'debug': 4});

parser.option('-V', '--version')
.help("print Narwhal version number and exit.")
.help("print Narwhal version number and exit")
.action(function () {
this.print("Narwhal Version 0.");
this.print("Narwhal Version 0");
this.exit();
});

parser.option('--no-term')
.help("disables terminal coloring (term module)")
.action(function () {
require("term").stream.disable();
});

parser.option('-O', 'optimize').inc().hidden();

parser.option('--narwhal')
Expand Down

0 comments on commit 1bf0bd1

Please sign in to comment.