This feature is still EXPERIMENTAL! Fold command may be used to mark elements matching the xpath with a xsh:fold attribute from the http://xsh.sourceforge.net/xsh/ namespace. When listing the DOM tree using ls xpath fold, elements marked in this way are folded to the depth given by the expression (default depth is 0 = fold immediately).