This guide explains how to install shell autocompletion for hyperexport and hyperctl.
# hyperexport
hyperexport --completion bash | sudo tee /etc/bash_completion.d/hyperexport
# hyperctl
hyperctl completion -shell bash | sudo tee /etc/bash_completion.d/hyperctl
# Reload completions (or restart your shell)
source /etc/bash_completion.d/hyperexport
source /etc/bash_completion.d/hyperctl
# Create completion directory if it doesn't exist
mkdir -p ~/.zsh/completion
# hyperexport
hyperexport --completion zsh > ~/.zsh/completion/_hyperexport
# hyperctl
hyperctl completion -shell zsh > ~/.zsh/completion/_hyperctl
# Add to ~/.zshrc if not already present
echo 'fpath=(~/.zsh/completion $fpath)' >> ~/.zshrc
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
# Reload
source ~/.zshrc
# hyperexport
hyperexport --completion fish > ~/.config/fish/completions/hyperexport.fish
# hyperctl
hyperctl completion -shell fish > ~/.config/fish/completions/hyperctl.fish
# Completions are loaded automatically in fish
--format → ovf, ova--provider → vsphere, aws, azure, gcp, hyperv--encrypt-method → aes256, gpg--manifest-target → qcow2, raw, vdi--daemon-list → all, running, completed, failedAfter installation, try typing:
# hyperexport - press TAB to see all options
hyperexport --<TAB>
# See format options
hyperexport --format <TAB>
# See provider options
hyperexport --provider <TAB>
# hyperctl - press TAB to see commands
hyperctl <TAB>
# See hyperctl submit options
hyperctl submit --<TAB>
Test if completions are working:
# Should show available options
hyperexport --form<TAB> # completes to --format
hyperctl comp<TAB> # completes to completion
# Should show value suggestions
hyperexport --format <TAB> # shows: ovf ova
hyperexport --provider <TAB> # shows: vsphere aws azure gcp hyperv
If completions don’t work immediately:
# Reload bash-completion
source /etc/bash_completion
# Or restart your shell
exec bash
If completions don’t work:
# Clear completion cache
rm -f ~/.zcompdump
compinit
# Or restart your shell
exec zsh
Fish should load completions automatically. If not:
# Rebuild completion cache
fish_update_completions
# Or restart fish
exec fish
Bash: /etc/bash_completion.d/
Zsh: /usr/share/zsh/site-functions/
Fish: /usr/share/fish/vendor_completions.d/
Bash: ~/.bash_completion
Zsh: ~/.zsh/completion/
Fish: ~/.config/fish/completions/
# Generate and install manually
hyperexport --completion bash > hyperexport-completion.bash
sudo mv hyperexport-completion.bash /etc/bash_completion.d/hyperexport
# For user-specific installation
hyperexport --completion bash >> ~/.bash_completion
source ~/.bash_completion
hyperexport --help for all available flagshyperctl help for all available commands