Permalink
Browse files

Reset state when using setArgv(), closes #31

  • Loading branch information...
1 parent d8370c5 commit 925c6ec1faa2baf712ab31f21fc94a7e0be6f48a @chriso chriso committed May 17, 2012
Showing with 4 additions and 1 deletion.
  1. +3 −0 cli.js
  2. +1 −1 package.json
View
3 cli.js
@@ -151,6 +151,9 @@ cli.setArgv = function (arr, keep_arg0) {
argv_parsed = false;
cli.args = cli.argv = argv = arr;
cli.argc = argv.length;
+ cli.options = {};
+ cli.args = [];
+ cli.command = null;
};
cli.setArgv(process.argv);
View
2 package.json
@@ -1,6 +1,6 @@
{ "name" : "cli",
"description" : "A tool for rapidly building command line apps",
- "version" : "0.4.3",
+ "version" : "0.4.4",
"homepage" : "http://github.com/chriso/cli",
"keywords" : ["cli","command line","opts","parseopt","opt","args","console","argsparse","optparse","daemon","autocomplete","command","autocompletion"],
"author" : "Chris O'Hara <cohara87@gmail.com>",

0 comments on commit 925c6ec

Please sign in to comment.