Relix

Programming guide

relix doc

Shows the reference page for TOPIC, found by glyph, keyword or name (σ, select, selection), through $PAGER on a terminal. With no TOPIC, lists the pages.

Usage

relix doc [OPTIONS] [TOPIC]

Arguments

ArgumentDescription
TOPICA glyph, keyword or name, such as σ, select, join or Len.

Options

OptionDescription
--functionLook TOPIC up among the functions only, or list only them.
--markdownPrint the page's markdown as it is, not rendered.
--no-pagerWrite the page to standard output even on a terminal.
-o, --output=FORMATThe rows' format: table, tsv, csv, ndjson, json or markdown (default: $RELIX_OUTPUT, else relixrc's, else table on a terminal, tsv in a pipe).
--no-headerLeave out the header row of csv and tsv.
--null=STRINGHow NULL is written (default: empty in csv, tsv and markdown; NULL in a table).
--color=WHENColour a table: auto, always or never (default: auto). auto colours on a terminal unless $NO_COLOR is set.

It also takes the global options.

Exit status

StatusMeaning
0success
2no page has that topic

Examples

A page is found by its glyph, its keyword or its name:

shell
relix doc --markdown σ | head -6
Result
# Name: Selection (σ / SELECT)

# Syntax:
σ <condition> (Relation)
SELECT <condition> (Relation)

With no topic, relix doc lists the pages, as rows:

shell
relix doc -o tsv | head -4
Result
topic	category	title	summary
getting-started	guide	Getting started	Your first script — declare data, name a result, run it
glossary	guide	Glossary	The vocabulary — relation, tuple, bag vs set, materialisation, pushdown
σ	operator	Selection	Filter rows by a condition

--function lists, or looks up, the functions only:

shell
relix doc --function -o tsv | grep -i '^round'
Result
Round	function	Round	Round to nearest

On a terminal a page is shown through $PAGER (less when it is not set); --no-pager writes it straight to standard output.