Documentation
¶
Index ¶
- Constants
- Variables
- func BuildEnv(base []string) []string
- func CheckInstalled() error
- func Complete(ctx context.Context, args []string, toComplete string) ([]string, error)
- func CompleterPath() (string, error)
- func Exec(ctx context.Context, endpointURL string, useProfile, usePTY bool, ...) error
- func IsHelp(args []string) bool
Constants ¶
const InstallURL = "https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html"
Variables ¶
var ErrCompleterNotFound = errors.New("aws_completer not found")
var ErrNotInstalled = errors.New("aws CLI not found in PATH")
Functions ¶
func CheckInstalled ¶ added in v0.13.0
func CheckInstalled() error
func Complete ¶ added in v0.21.0
Complete returns the aws CLI's own completion candidates for `aws <args...> <toComplete>`, where toComplete is the partial word under the cursor (empty when the cursor sits after a space).
Bounding how long a Tab press may block is the caller's call: pass a ctx with a deadline.
func CompleterPath ¶ added in v0.21.0
CompleterPath resolves the aws_completer binary. It is usually on PATH alongside aws, but some installs expose only aws, so fall back to a sibling of the (symlink-resolved) aws binary: the v2 installer puts /usr/local/bin/aws there as a symlink into an install dir that also holds aws_completer.
func Exec ¶
func Exec(ctx context.Context, endpointURL string, useProfile, usePTY bool, stdout, stderr io.Writer, args []string) error
Exec runs `aws <args...>` against endpointURL. When usePTY is true (lstk's stdout and stderr are both terminals), the child's output goes through a pseudo-terminal merged into stdout — see proc.RunInPTY for why; otherwise stdout/stderr are wired as given.
Types ¶
This section is empty.