This function is used to install and switch versions of CLI plugins.
You must source the script containing the funciton. E.g.
source asdfu.sh
The function will:
- Add plugin if necessary.
- Install the latest version if no version is specified.
- Install the version if necessary
- Set the version globally
Install latest kubectl:
asdfu kubectl
Install Kubectl version 1.28.2
asdfu kubectl 1.28.2