Revision [248]
This is an old revision of CommandExecution made by DavidLee on 2008-07-04 11:26:49.
Command Execution
Commands can be either builtin, internal, user defined or external commands.
Builtin commands are "special" in that they interact with the shell environment.
Internal commands implemented as a "convenience" in that they could be also implemented as
user defined commands. User defined commands are supported by creation of a jar containing
classes which implement the ICommand interface. External commands are any command (process)
outside of xmlsh. External commands are executed as seperate processes, all other commands are
executed with the JVM of xmlsh.
When given a command name to execute, xmlsh search in the following order.
- Builtin Command
- Internal Command
- User defined command
- External command
Builtin Commands
Builtin commands are special to xmlsh. They are "built in" because they need to interact with the shell and environmentin ways that other commands cannot. For example the "read" command reads values into a variable.
See Builtin Commands for the list of builtin commands
Internal Commands
See Internal Commands for the list of internal commands.Internal commands are implemeted as java code that runs within the JVM of xmlsh. They are fundimentally no different from 'user defined commands' except they are supplied with xmlsh as a core toolset and are expected to be installed as part of every xmlsh installation.
User Defined Commands
Users can add commands which operate the same as Internal Commands (run within the same JVM).TODO: document internal command installation.
External Commands
External commands are programs which run outside the JVM. These are the same "commands" that the OS shells execute.External commands are found by looking in the PATH environment variable. They are executed as a sub process.
See Also BasicSyntax