diff --git a/argv.js b/argv.js index 61e4585..4453cf9 100644 --- a/argv.js +++ b/argv.js @@ -799,6 +799,9 @@ object.Constructor('Parser', { && key.replace(this.optionInputPattern, '$2') == 'help' && this['-help'] == '-h'){ for(var n in this){ + // skip non-options... + if(/^[\w_]/.test(n)){ + continue } // only print if extended help available... if(this[n] instanceof Parser){ return this.extendedHelp.handler.call(this, ...arguments) } } } @@ -969,6 +972,9 @@ object.Constructor('Parser', { // print help for nested parsers... for(var n in this){ + // skip non-options... + if(/^[\w_]/.test(n)){ + continue } // doc... if(this[n] instanceof Parser && this[n].doc !== false){ diff --git a/package.json b/package.json index 5affc5c..39d802b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ig-argv", - "version": "2.16.9", + "version": "2.16.10", "description": "simple argv parser", "main": "argv.js", "scripts": {