Wiki source for CommandExecution


Show raw source

======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 separate 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, internal or experimental Command
- XMLSH script
- External command
- Extension Module commands


=====Standard Commands=====

[[Commands commands]] consist of Internal and experimental commands.

Builtin commands are special to xmlsh. They are "built in" because they need to interact with the shell and environment
in ways that other commands cannot. For example the "read" command reads values into a variable.

Internal commands are implemented as java code that runs within the JVM of xmlsh. They are fundamentally 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.

Experimental commands are still under development and are not yet considered stable.

=====XMLSH Scripts=====
XMLSH Scripts are any xmlsh commands put into a file with the extension ".xsh".
They are invoked by using the base filename (with or without the .xsh). They can be explicitly invoked by full path names, or found with the [[VariableXPATH XPATH]] Variable.


=====Extension Module Commands=====
[[Modules Extension Modules]] can be written to add commands to xmlsh which work like internal commands.



=====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.
They can be explicitly invoked by full path names, or found with the [[VariablePATH PATH]] Variable.

----
See Also [[BasicSyntax]]
See Also [[VariableXPATH XPATH]]
See Also [[VariablePATH PATH]]
See Also [[HowToScript]]
See Also [[Modules Extension Modules]]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki