fold

Usage

fold xpath [expression]

Description

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).

xsh> fold //chapter 1
xsh> ls //chapter[1] fold
<chapter id="intro" xsh:fold="1">
  <title>...</title>
  <para>...</para>
  <para>...</para>
</chapter>

See Also

unfold, ls