Documentation
¶
Overview ¶
Package completion configures shell completion predictors for the CLI.
Index ¶
Constants ¶
View Source
const ( ResourceName = "client:resource_name" ProjectName = "client:project_name" PostgresDatabases = "client:postgres_databases" MySQLDatabases = "client:mysql_databases" )
View Source
const DebugENV = "NCTL_COMPLETION_DEBUG"
DebugENV enables completion diagnostics on stderr.
Predictors have to swallow every error, as anything they return ends up in the candidate list of the shell. Without diagnostics a misconfigured client is indistinguishable from a project holding no resources.
Variables ¶
This section is empty.
Functions ¶
func Command ¶
Command builds the complete.Command tree for shell completion. The predictors report to log why they predict nothing.
func NewDebugLogger ¶
NewDebugLogger returns a logger writing to w why predictors predict nothing.
Every record starts on a new line, because the shell prints it in the middle of the line the user is currently completing.
Types ¶
Click to show internal directories.
Click to hide internal directories.