JNode-Shell

The new command line syntax mechanism

It is very good to see progress in the shell part of JNode. However I have a question. Why are the arguments converted to an array of strings before it is given to the shell command? It seems to me that information is "lost" in this conversion.

Kind regards
Jacob Kofod

Is FileArgument pathname expansion a bad idea?

(After posting this as a blog entry, I realised I should have made it a forum topic ...)

In traditional operating systems, there are two approaches to implementing pathname patterns, or wildcards as they are often called. The UNIX approach is to have the command shell expand the patterns and pass the resulting pathnames to the command. Thus "cat *.java" typically leads to the "cat" command being run with multiple file names as separated arguments. The "cat" command does not get to see the original pattern.

The DOS / VMS approach is for the patterns to be passed intact to the command. It is then up to the command to treat an argument containing wildcard characters literally, expand it into a list of pathnames, or interpret it some other way. (In the case of DCL, there is a command for expanding wildcards that allows you to process them in a script.)

Java based javac

Working on making the ant command work I found that it seems like we miss a java based javac (doing trying to compile a java file with a build.xml file under JNode). Does any of you have a url to a open source java based javac, so fare I haven't found one?

Regards,
Martin

System.in and console command

Now, System.in can be used transparently by commands. I have tested with the mauve-filter command and that works well.

In theory, System.setIn can be used for different commands independantly (one System.in per Thread with inheritence) and also piped ('|') commands ... but I haven't tested that.

The console command also works and I successfully run commands under a new console and came back to the first one and typed other commands Smiling

Shell usability

Hi all,

I´d like to extend the usability of JNode's shell and also write some new commands. For this I have some suggestions for new APIs and API changes.
Please comment on it. Say what you think about it, if you have other/new ideas or whatever...

Currently the Command Interface has one method that looks like this:

public void execute(CommandLine commandLine, InputStream in, PrintStream out, PrintStream err) throws Exception;

----------

The CommandLine is something like a Parser that provides tokens. I´d like to replace this by a class CommandArgs that looks like this:

Syndicate content