joyent/node — pull request #5041 by Niggler (2013-03-16 16:27:42+00:00)
Title: Added ability to run interactively with arguments

There currently is no way to run node interactively and pass arguments without
a file: `node -i foo bar baz` will instruct node to load `foo`.

This commit adds a `--` argument that instructs node to run interactive and not
to load any file in the argv:

$ node -i -- foo bar baz
> process.argv
[ '/the/path/to/node',
'--',
'foo',
'bar',
'baz' ]

The same thing works without the '-i':

$ node -- foo bar baz
> process.argv
[ '/the/path/to/node',
'--',
'foo',
'bar',
'baz' ]