Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -131,57 +131,6 @@ These apply to both interactive and non-interactive (scripted/CI) use, see [Auto
`lstk` includes completion scripts for bash, zsh, fish, and powershell.
If you installed via Homebrew, completions are set up automatically.

For manual setup:

<Tabs>
<TabItem label="Bash">

```bash
# Load in current session
eval "$(lstk completion bash)"

# Persist (Linux)
lstk completion bash > /etc/bash_completion.d/lstk

# Persist (macOS with Homebrew)
lstk completion bash > $(brew --prefix)/etc/bash_completion.d/lstk
```

:::note
Use `eval "$(lstk completion bash)"` rather than `source <(lstk completion bash)`.
The `lstk` script works with or without the `bash-completion` package (it bundles a fallback for stock macOS bash 3.2), but `source <(...)` is a silent no-op on that shell.
:::

</TabItem>
<TabItem label="Zsh">

```bash
# Load in current session
source <(lstk completion zsh)

# Persist (Linux)
lstk completion zsh > "${fpath[1]}/_lstk"

# Persist (macOS with Homebrew)
lstk completion zsh > $(brew --prefix)/share/zsh/site-functions/_lstk
```

</TabItem>
<TabItem label="Fish">

```bash
# Load in current session
lstk completion fish | source

# Persist
lstk completion fish > ~/.config/fish/completions/lstk.fish
```

</TabItem>
</Tabs>

Restart your shell after persisting completions.

### `completion`

Generate shell completion scripts.
Expand All @@ -190,4 +139,4 @@ Generate shell completion scripts.
lstk completion [bash|zsh|fish|powershell]
```

See [Shell completions](#shell-completions) above for setup instructions.
Run `lstk completion` to print setup instructions in your terminal.
54 changes: 2 additions & 52 deletions src/content/docs/azure/developer-tools/lstk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ Generate shell completion scripts.
lstk completion [bash|zsh|fish|powershell]
```

See [Shell completions](#shell-completions) for setup instructions.
Run `lstk completion` to print setup instructions in your terminal.

## Global options

Expand Down Expand Up @@ -1438,58 +1438,8 @@ Pair this behavior with a custom [`image`](#custom-container-image) that points

`lstk` includes completion scripts for bash, zsh, fish, and powershell.
If you installed via Homebrew, completions are set up automatically.
Once completion is enabled, `lstk aws <TAB>` also completes AWS services, operations, and parameters using the AWS CLI's own completer.

For manual setup:

<Tabs>
<TabItem label="Bash">

```bash
# Load in current session
eval "$(lstk completion bash)"

# Persist (Linux)
lstk completion bash > /etc/bash_completion.d/lstk

# Persist (macOS with Homebrew)
lstk completion bash > $(brew --prefix)/etc/bash_completion.d/lstk
```

:::note
Use `eval "$(lstk completion bash)"` rather than `source <(lstk completion bash)`.
The `lstk` script works with or without the `bash-completion` package (it bundles a fallback for stock macOS bash 3.2), but `source <(...)` is a silent no-op on that shell.
:::

</TabItem>
<TabItem label="Zsh">

```bash
# Load in current session
source <(lstk completion zsh)

# Persist (Linux)
lstk completion zsh > "${fpath[1]}/_lstk"

# Persist (macOS with Homebrew)
lstk completion zsh > $(brew --prefix)/share/zsh/site-functions/_lstk
```

</TabItem>
<TabItem label="Fish">

```bash
# Load in current session
lstk completion fish | source

# Persist
lstk completion fish > ~/.config/fish/completions/lstk.fish
```

</TabItem>
</Tabs>

Restart your shell after persisting completions.
Run `lstk completion` to print setup instructions in your terminal.

## FAQ

Expand Down
Loading