JNode Shell
Submitted by hagar on Mon, 05/22/2006 - 13:20.
The JNode command shell enables simple commands to be executed.
The command shell (or more accurately, the keyboard interpreter) supports the following keyboard events:
| <SHIFT>+<UP ARROW> | Scroll the console up a line |
| <SHIFT>+<DOWN-ARROW> | Scroll the console down a line |
| <SHIFT>+<PAGE-UP> | Scroll the console up a page |
| <SHIFT>+<PAGE-DOWN> | Scroll the console down a page |
| <ALT>+<F1> | Switch to the main command console |
| <ALT>+<F2> | Switch to the second command console |
| <ALT>+<F7> | Switch to the Log console (read only) |
| <TAB> | Command / input completion |
| <UP-ARROW> | Go to previous history entry |
| <DOWN-ARROW> | Go to next history entry |
| <LEFT-ARROW> | Move cursor left |
| <RIGHT-ARROW> | Move cursor right |
| <BACKSPACE> | Delete character to left of cursor |
| <DELETE> | Delete character to right of cursor |
| <CTRL>+<C> | Interrupt command |
| <CTRL>+<D> | Soft EOF |
| <CTRL>+<Z> | Suspend command |
| <CTRL>+<L> | Clear the console for text |
A list of available commands can be found below.
To use command line completion in the shell, just type the <TAB> key on your keyboard.
To show the usage of a command, hit <TAB> after typing a "-" as a parameter, e.g.:
JNode /> if<TAB>
expands to
JNode /> ifconfig
and
JNode /> ifconfig -<TAB>
will show the usage of the ifconfig command and let you go on editing your commandline.
Commands:
Note: The following is old documentation. If a command is not listed below, refer to the JNode Commands page for the command's documentation.



It's good to see progress
It's 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.
Austin Kaitlyn
It doesn't quite work that way.
Command's that are implemented "the JNode way" typically don't see argument strings at all. Rather, they get argument values delivered to them as objects (Integer, File, Device, etc) bound to Argument objects. If they want to, they can also get hold of the command line tokens (including the command alias used) via the CommandLine object passed to "execute".
You may be mislead by the "public static void main(String[])" methods. In general, those are only there for legacy reasons. A command is usually invoked by creating an instance and calling its "execute(CommandLine, InputStream, PrintStream, PrintStream)" method.
But this is still a work-in-progress. For example, the APIs don't yet capture the raw characters in the tokens (for completion), and there is currently no way to get back the token(s) that were turned into the value(s) bound to an Argument instance.
I don't think the application should need to to see what the original arguments were in most cases. It is the shell's job to deal with stuff like quoting and variable expansion, and that application has no need to know about it. File pattern arguments are less clear cut, but I tend to think that the shell should take care of them as well. Others disagree with me ... of course
Properties?
Where are the properties the set command changes actually stored in the filetree?
--
Robert "Exile In Paradise" Murphey
The properties are not persistent.
The set command is changing properties in JNode's system Properties object; i.e. System.getProperties(). These properties do not persist.
startawt is not documented
The startawt command for starting the GUI from console is not documented here. It is not clear if this command supports any options. The command could support an option to start in the plain VGA mode if the driver for the more advanced modes is not available or is not functioning properly with the current graphic card.
The command is now
The command is now included in this documentation.