I want to use bash autocomplete feature with saltstack.
salt '*' test.p <tab> should complete the word and make it salt '*' test.ping.
After googling, I got the following links: salt.bash & CLI completion
However, I cannot figure out how to use it. Autocompletion feature is not working by default. Please provide any step by step guide to activate it.
Download the salt.bash file.
wget https://raw.githubusercontent.com/saltstack/salt/develop/pkg/salt.bash
Copy the file to /etc/bash_completion.d/
cp salt.bash /etc/bash_completion.d/
Logout and logback in. or source the file
source /etc/bash_completion.d/salt.bash
Now use salt auto-completion feature
salt '*' tes[[tab]].pi[[tab]]
and get the result:
salt '*' test.ping
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With