# zsh

The cldkctl completion zsh command generates an autocomplete script for the Zsh shell. This feature enables autocompletion for cldkctl commands and flags, allowing users to quickly complete inputs by pressing the Tab key. If shell completion is not yet enabled in your environment, it must be activated first before using this command.

## Usage

```
cldkctl completion zsh [flags]
```

## Steps

Follow the steps below to run and view the result of this command:

1. If Zsh completion is not yet enabled in your environment, enable it by executing the following command once:

```
echo "autoload -U compinit; compinit" >> ~/.zshrc
```

This will activate the completion system for Zsh globally.

2. To load completions for the current shell session, run:

```
source <(cldkctl completion zsh)
```

This enables autocompletion immediately but only for the current session.

3. To load completions permanently for every new session:

* On Linux, execute:

```
cldkctl completion zsh > "${fpath[1]}/_cldkctl"
```

* On macOS, execute:

```
cldkctl completion zsh > $(brew
```

```
--prefix)/share/zsh/site-functions/_cldkctl
```

4. After adding the file, start a new Zsh shell session for the setup to take effect.
5. Once configured, typing any cldkctl command and pressing Tab will display available subcommands and flags.

## Flags

{% hint style="info" %}
This command supports global flags. Refer to the Global Flags section for details
{% endhint %}

| Flag       | Description                      |
| ---------- | -------------------------------- |
| -h, --help | Help for the zsh subcommand.     |
| --help     | Disable completion descriptions. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudeka.ai/cloudeka-api-list/command-reference/cldkctl-completion/zsh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
