cape.ui Readline-based user interface to CAPE¶
This class provides an interactive interface for the main CAPE tools (that is, running CFD) without major third-party dependencies. This simplified CAPE UI is launched using
$ cape ui
There are two main applications to using this user interface:
Targeted tab-completion
The user interface provides CAPE-aware tab completions based on details of the CLI defined in
cape.cfdx.cli, includinginferring the sub-command such as
cape extend,cape run, etc. (seecape.cfdx.cli.CfdxFrontDesk._cmdlist);knowledge of which options are available for each sub-command (for example
cape edit-json -andcape c -will have different tab-completion suggestions);knowledge of which options expect file names.
Dedicated history
The CAPE UI maintains a separate history file so that users can recall previous commands using the “UP” arrow key.
While using the CAPE UI pseudo-shell, users will still be able to run non-CAPE commands, though in that case tab-completion may not be as smart as the native shell.