Skip to main content

Resoto Shell Tab Completion

· 2 min read
Matthias Veit

Resoto has a command-line interface accessible via Resoto Shell. Commands are not executed locally, but interpreted on the server. As such, only Resoto Shell is required client-side.

Resoto offers commands like echo, tail, and jq—old friends to veteran shell users—but these commands only account for a small fraction of the possibilities in Resoto's command-line interface.

Version 2.X of Resoto Shell introduces tab completion, making the command-line interface easier to use than ever before! Press the tab key, and Resoto Shell will present you with a list of available commands:

List of commands

The tab completion feature is context-aware and will even help you configure the options for a command:

List of commands

Search Syntax

Previous blog posts have touched upon the power and extensibility of Resoto's search syntax, but learning the ins and outs of Resoto's search syntax has a rather steep learning curve. Never fear—the new tab completion feature also provides autocomplete for the search command to make Resoto's search functionality more accessible:

Search in action

Resources can be filtered by kind using is(<kind>) and the automated assistance uses fuzzy search, allowing you to simply type a portion of the desired text or even just the first letters. For example, v_t will yield the suggestion volume_type.

Filter expressions use the syntax <field> <operator> <value>, and possible fields and operators are presented as suggestions as well. The autocomplete feature ideally would only list properties that are relevant for the selected kind, but it is currently shows always all possible properties—we plan to address this in the future.

Aggregation

The aggregate command also uses special syntax to define aggregation expressions, and tab completion again can help:

Aggregate in action

As you can see, the autocomplete feature lists possible properties. There is also support for defining /ancestors grouping variables.

As mentioned previously, Resoto Shell is context-aware and will supply a list of possible aggregation functions. And since every grouping variable and every aggregation function can be renamed, the optional as clause is suggested as well.

We hope that the new tab completion feature makes Resoto's command-line interface easier to use!

Contact Us

Have feedback or need help? Don’t be shy—we’d love to hear from you!

 

 

 

Some Engineering Inc.