indent command


indent expression


If the value of expression is 1, format the XML output while saving a document by adding some nice ignorable whitespace. If the value is 2 (or higher), XSH will act as in case of 1, plus it will add a leading and a trailing linebreak to each text node.

Note, that since the underlying C library (libxml2) uses a hardcoded indentation of 2 space characters per indentation level, the amount of whitespace used for indentation can not be altered on runtime.

This command is equivalent to setting the $INDENT variable.