Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
LIBXO(3)		 BSD Library Functions Manual		      LIBXO(3)

     xo_options	-- common options for libxo-based commands

     libxo allows the rendering	of data	into various output styles, including
     text, XML,	JSON, and HTML.	 libxo uses command line options to trigger
     rendering behavior.  Options are recognised in three forms:

     +o	 --libxo <options>

     +o	 --libxo=<options>

     +o	 --libxo:<brief-options>

     The first two forms accept	a comma-separated set of words,	detailed be-
     low, while	the third form accepts a set of	letters, also below.  The
     triggered functionality is	identical.

     Option	 Action
     color	 Enable	colors/effects for display styles (TEXT, HTML)
     flush	 Flush after each emit call
     flush-line	 Flush each line of output
     html	 Emit HTML output
     indent=xx	 Set the indentation level
     info	 Add info attributes (HTML)
     json	 Emit JSON output
     keys	 Emit the key attribute	for keys (XML)
     log-gettext Log (via stderr) each gettext(3) string lookup
     log-syslog	 Log (via stderr) each syslog message (via xo_syslog)
     no-humanize Ignore	the {h:} modifier (TEXT, HTML)
     no-locale	 Do not	initialize the locale setting
     no-retain	 Prevent retaining formatting information
     pretty	 Emit pretty-printed output
     retain	 Force retaining formatting information
     text	 Emit TEXT output
     underscores Replace XML-friendly
     units	 Add the 'units' (XML) or 'data-units (HTML) attribute
     warn	 Emit warnings when libxo detects bad calls
     warn-xml	 Emit warnings in XML
     xml	 Emit XML output
     xpath	 Add XPath expressions (HTML)

     The brief options are a set of single-letter aliases for the longer
     terms, used as a single string:

     Value Equivalent Token
     f	    flush
     F	    flush-line
     H	    html
     I	    info
     i<num> indent=<num>
     J	    json
     k	    keys
     n	    no-humanize
     P	    pretty
     T	    text
     U	    units
     u	    underscore
     W	    warn
     X	    xml
     x	    xpath

     Most of these option are simple and direct, but some require additional

     flush-line	performs line buffering, even when the output is not directed
     to	a TTY device.

     info generates additional data for	HTML, encoded in attributes using
     names that	state with "data-".

     keys adds a "key" attribute for XML output	to indicate that a leaf	is an
     identifier	for the	list member.

     no-humanize avoids	"humanizing" numeric output (see humanize_number(3)
     for details).

     no-locale instructs libxo to avoid	translating output to the current lo-

     no-retain disables	the ability of libxo to	internally retain "compiled"
     information about formatting strings.

     underscores can be	used with JSON output to change	XML -friendly names
     with dashes into JSON -friendly name with underscores.

     warn allows libxo to emit warnings	on stderr when application code	make
     incorrect calls.  warn-xml	causes those warnings to be placed in XML in-
     side the output.

     The following are three example invocations of ps(1):

	   ps --libxo json,pretty,warn -ux

	   ps --libxo=xml -lg

	   ps --libxo:Hxc 1

     libxo(3), xo_format(5)

     The libxo library first appeared in FreeBSD 11.0.

     libxo was written by Phil Shafer <>.

BSD				 May 11, 2017				   BSD


Want to link to this manual page? Use this URL:

home | help