mirror of
https://github.com/flynx/argv.js.git
synced 2025-10-28 18:30:07 +00:00
notes + minor tweak...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
bad2ea8c6d
commit
622eadee96
7
argv.js
7
argv.js
@ -375,6 +375,13 @@ object.Constructor('Parser', {
|
||||
console.log(this.version || '0.0.0')
|
||||
return module.STOP }, },
|
||||
|
||||
// Stop processing arguments and continue into .then(..) handlers...
|
||||
//
|
||||
// If .then(..) does not handle rest in the nested context then this
|
||||
// context will be returned to the parent context, effectively
|
||||
// stopping the nested context and letting the parent continue.
|
||||
//
|
||||
// XXX should we be able to force the parent/root to also stop???
|
||||
// XXX do we actually need this???
|
||||
'-': {
|
||||
doc: 'stop processing arguments after this point',
|
||||
|
||||
8
test.js
8
test.js
@ -41,7 +41,6 @@ argv.Parser({
|
||||
},
|
||||
|
||||
'-test': argv.Parser({
|
||||
// XXX ENV
|
||||
env: 'TEST',
|
||||
default: 'moo',
|
||||
}).then(function(){
|
||||
@ -97,11 +96,10 @@ p(['test', 'nested', '-h'])
|
||||
p(['test', '-h'])
|
||||
//*/
|
||||
|
||||
if(typeof(__filename) != 'undefined'
|
||||
&& __filename == (require.main || {}).filename){
|
||||
typeof(__filename) != 'undefined'
|
||||
&& __filename == (require.main || {}).filename
|
||||
&& p()
|
||||
|
||||
p(process.argv)
|
||||
}
|
||||
|
||||
|
||||
/**********************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user