Add posibility to pass unchanged command line to commands

I have requested this feature a long time ago in Sun's bug parade (, but unfortunately nobody was interested in it. I still believe the current method of passing a command line has shortcomings, applications can not report incorrect use of quotes for example.

I think this feature can be added to the JNode shell without breaking backward compatibility. The DefaultCommandInvoker and the ThreadCommandInvoker need to look for a public static void main(String args) first. If it is present, the unchanged command line is passed to the command. Otherwise the standard Java main method is invoked with the command line already split up in separate parameters.

The changes are not too intrusive, so when there is enough interest I am more than willing to make the changes and post the patches.

Johan Stuyts

Generally, no bad thought, but...

...I don't think this should be handled by the commands themselves. The outcome would be something similar to the GNU command line crap, where there is no real standard about putting a "-" or not. Only instead you'd probably have commands taking ambiguously marked strings. No good.
The command line completion currently supports kind of automatical notation for strings (both ' and " including escapes), and it should be quite easy to modify the method to check the final result - instead of automatically reformatting, which it does right now IIRC. The point is to do this at exactly one place, rather that leave the logic to the command programmer.