Page cover

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.

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

source <(cldkctl completion zsh)

This enables autocompletion immediately but only for the current session.

  1. 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

  1. After adding the file, start a new Zsh shell session for the setup to take effect.

  2. Once configured, typing any cldkctl command and pressing Tab will display available subcommands and flags.

Flags

This command supports global flags. Refer to the Global Flags section for details

Flag
Description

-h, --help

Help for the zsh subcommand.

--help

Disable completion descriptions.

Last updated