Documentation
¶
Overview ¶
Package tui cmd/skywire/tui/install.go
Package tui cmd/skywire/tui/tui.go
An interactive console over the skywire command line: a scrollback of everything run so far, a prompt to type the next command into, and the code rain falling behind both. `skywire --tui`, or `--tui` alongside any `--help`.
The console starts on the help for the command it was opened on and runs the real binary from there. A plain line is run captured — its output is folded into the scrollback. A line beginning with `!` is run in the real terminal: the TUI steps aside, hands the child the screen (so a pty exec, a live plot, anything streaming or full-screen works), and resumes when it exits.
Index ¶
Constants ¶
const FlagName = "tui"
FlagName is the flag that opens the browser.
Variables ¶
This section is empty.
Functions ¶
func Install ¶
Install adds --tui to root and makes it open the browser instead of printing help.
Hooking help rather than adding a command covers both spellings for free: `skywire --tui` reaches it because the root command prints its help when it is run with no arguments, and `skywire cli visor --help --tui` reaches it because that is a help call too — and arrives with the command the user named, which is where the browser opens.
Call last, after anything else that wraps help. This decides whether help is shown interactively at all, so it belongs outside the wrappers that decide what shown help looks like.
Types ¶
This section is empty.