Skip to content

kx state

Shows the listing that indexes currently resolve against.

kx keeps a stack of recent kx get results — max_history of them, 10 by default — with a cursor marking the current one. --all lists the stack, a position jumps to an entry, and back/forward step through it.

Namespaces and contexts sit in slots of their own, outside that stack: kx ns 2 counts against the namespaces you last listed however much you have listed since, and switching namespace never pushes work off the stack. --targets expands both slots, so you can pick a number without listing again.

To act on a namespace rather than switch to it, list it with kx get ns. That stacks it like any other listing — kx describe 2, kx label 2 — and refreshes the slot too, so the two spellings never disagree about what 2 means.

Usage

kx state [OPTIONS] [position]

Subcommands

CommandDescription
kx state backNavigate to the previous kx get result.
kx state dropRemove a history entry by position (shown in kx state --all); --all clears everything, including namespace/context slots.
kx state forwardNavigate to the next kx get result.

Arguments

ArgumentDescription
[position]History position, as numbered by kx state --all

Options

OptionDescription
-a, --allShow the full history stack
-t, --targetsShow the namespace and context listings the switch commands index into

Global options

OptionDescription
--no-colorDisable styled output
-h, --helpShow this message and exit

Examples

kx state
kx state --all
kx state --targets
kx state 2