awscli

package
v0.21.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const InstallURL = "https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html"

Variables

View Source
var ErrCompleterNotFound = errors.New("aws_completer not found")
View Source
var ErrNotInstalled = errors.New("aws CLI not found in PATH")

Functions

func BuildEnv

func BuildEnv(base []string) []string

func CheckInstalled added in v0.13.0

func CheckInstalled() error

func Complete added in v0.21.0

func Complete(ctx context.Context, args []string, toComplete string) ([]string, error)

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

func CompleterPath() (string, error)

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.

func IsHelp added in v0.18.0

func IsHelp(args []string) bool

IsHelp reports whether args requests the aws CLI's help output. The aws CLI answers this without needing a running emulator or resolved endpoint.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL