substack/node-optimist — pull request #48 by refractalize (2012-02-23 05:30:01+00:00)
Title: Aliases to booleans aren't parsed as booleans

# in stuff.js

var argv = require('optimist').boolean('z').alias('z', 'zap').argv;

if (argv.zap) { ... }

# when called like this:

node stuff.js --zap xyz

argv.zap == 'xyz'
argv._ == []

# bug when called like this:

node stuff.js -z xyz

argv.zap == true
argv._ == ['xyz']