Page cover

bash

The cldkctl completion bash command generates an autocomplete script for the bash shell. This feature allows you to quickly complete cldkctl commands and flags by pressing the Tab key, improving efficiency and reducing typing errors. It requires the bash-completion package to be installed beforehand.

Usage

cldkctl completion bash

Steps

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

  1. Ensure that the bash-completion package is installed on your system. If it is not installed, you can install it using your operating system’s package manager.

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

source <(cldkctl completion bash)

This will activate the autocomplete feature temporarily until the terminal session is closed.

  1. To enable autocompletion permanently for every new session, execute one of the following commands based on your operating system:

  • For Linux

cldkctl completion bash > /etc/bash_completion.d/cldkctl
  • For MacOS

cldkctl completion bash > $(brew
 --prefix)/etc/bash_completion.d/cldkctl
  1. After executing the setup command, start a new terminal session to apply the changes.

  2. Once configured, you can type any cldkctl command and press Tab to automatically complete subcommands or flags.

Flags

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

Flag
Description

-h, --help

Help for the bash subcommand.

--help

Disable completion descriptions.

Last updated