Skip to content

Latest commit

 

History

History
59 lines (39 loc) · 960 Bytes

File metadata and controls

59 lines (39 loc) · 960 Bytes

🔄 Autocomplete

🐚 Bash

To enable autocomplete in Bash, you need to have the bash-completion package installed:

📦 Install bash-completion

  • Ubuntu/Debian:

    sudo apt install bash-completion
  • Arch Linux:

    sudo pacman -S bash-completion

Configure the autocomplete

Get the script and save it in your personal directory:

mkdir -p ~/.rabbix
rabbix completion bash > ~/.rabbix/rabbix.bash

Add to your ~/.bashrc:

echo 'source ~/.rabbix/rabbix.bash' >> ~/.bashrc

Restart the terminal or run:

source ~/.bashrc

🧞 Zsh

In Zsh, autocomplete is more straightforward and doesn't require extra dependencies.

Configure the autocomplete

Add this line to the end of your ~/.zshrc:

autoload -U compinit; compinit
source <(rabbix completion zsh); compdef _rabbix rabbix

Restart the terminal or run:

source ~/.zshrc