substack/node-optimist — pull request #78 by yyfrankyy (2012-11-12 05:39:01+00:00)
Title: add `.normalize(args..)` support for normalizing pathes

I believe there's a lot of cases when we normalize path for command-line, such as `~/`, `__dirname + "../"`, with this feature, we can handle `path.normalize` by default.

```JavaScript
var a = optimist([ '-s', '/tmp/../' ]).alias('s', 'save').normalize('s').argv
t.same(a.s, '/');
t.same(a.save, '/');
t.end();
```

Even `Setter` are supported, in case someone set `argv.attr` manually.
```JavaScript
var a = optimist(['-s']).normalize('s').argv
t.same(a.s, true)
a.s = '/path/to/new/dir/../../'
t.same(a.s, '/path/to/');
t.end();
```