Revision [748]
This is an old revision of CommandSet made by DavidLee on 2009-09-16 07:51:26.
Command set
Name
set sets options and positional parametersSynopsis
set [options] [param1 [param2 ...]]Options
-x Turns on execution tracing (default off)-v Turns on command interpretation parse tracing (default off)
-omit-xml-declaration Sets the global Serialization parameter "omit-xml-declaration" (default on)
-indent Sets the global Serialization parameter "indent" (default on)
-encoding charset Sets the Serialization parameters "text-encoding" and "xml-encoding" to charset (default "UTF-8")
-text-encoding charset Sets the Serialization parameter "text-encoding" to charset (default "UTF-8")
-xml-encoding charset Sets the Serialization parameter "xml-encoding" to charset (default "UTF-8")
-xpipe Turns on the xpipe implementation for pipes (Experimental) (default off)
-xinclude Turns on the xinclude option for parsing. (see Serialization) (default off)
set options
If any options are specified then they set the global shell options for the current shell.Preceding any boolean option by a + instead of a - will turn OFF that option.
Example
set +omit-xml-declaration
turns OFF the omit-xml-declaration option
set parameters
Sets the positional parameters or prints environment variablesExample: sets $1 to "foo" and $2 to "bar"
$ set foo bar
Positional parameters can also be XML expressions
$ set <[1,"foo",<bar>spam</bar>]>
print variables
With no arguments prints the names and types of all variables as an xml document.Note this differences from the unix shells in that it doesnt print the variables value, this is because
values in xmlsh can be extremely large.
$ set <env> <variable name="a" type="xml"/> <variable name="PATH" type="string"/> </env>
CommandsStandard