Generate Command Completion

This command generates CLI completions for bash and fish, by specifying either bash or fish as a subcommand. Adding the output of this script to your ~/.bashrc file will enable the use of the [TAB] key to auto-complete fluvio commands.

 

fluvio completions

Generate command-line completions for Fluvio

Run the following two commands to enable fluvio command completions.

Open a new terminal for the changes to take effect.

$ fluvio completions bash > ~/fluvio_completions.sh 
$ echo "source ~/fluvio_completions.sh" >> ~/.bashrc

Usage: fluvio completions <COMMAND>

Commands:
  bash  Generate CLI completions for bash
  zsh   Generate CLI completions for zsh
  fish  Generate CLI completions for fish

Options:
  -h, --help
          Print help (see a summary with '-h')

Example usage for bash shell. Note that we are piping the output of the command to a shell script. We then add the script to the ~/.bashrc file.

Generate the command completion script:

$ fluvio completions bash > ~/fluvio_completions.sh

Add script to bash file:

$ echo "source ~/fluvio_completions.sh" >> ~/.bashrc

Open a new terminal for the changes to take effect.

Once complete, you can use the [TAB] key to auto-complete fluvio commands. For example, typing flu[TAB] comp[TAB] will yield fluvio completions in your bash terminal.