Closed joaojeronimo closed 11 years ago
you have to quote variadic commands (mon "node test.js"
)
I don't get it... mon "node test.js"
is exactly what I did, and got the output above.
I went digging through mon.c
, and in line 485, const char *cmd = program.argv[0];
, program.argv[0]
is just node
. program.argv[1]
is test.js
, and so on. I am quoting the commands...
oh sorry I only read $ mon node test.js
, ill take a look
hmm on 1.2.0? ./mon "node -e 'console.log(5)'"
for example works fine for me
Weird... I got unrecognized flag -e
Oh I'm so sorry, its completely my fault.
I was using mon with
mon () {
~/.mon/mon $@
}
in my ~/.bashrc
. I guess the quotes got lost with $@
.
Quoting $@
like "$@"
solves the problem.
mon () {
~/.mon/mon "$@"
}
Or I should have just used alias mon="~/.mon/mon"
yup, or make install
, or add ~/.mon to your PATH
Hi, I think I cannot pass arguments to programs.
For instance, I wrote
server.js
(which only starts a plain http server), andnode server.js
works as expected. If I add#! /usr/bin/env node
to the file andchmod +x server.js
, then./server.js
also works.mon ./server.js
also works as expected, but the problem is that I can't seem to getmon "node server.js"
to work. I get this:Which is the nodejs prompt (
node
command with no argument).