-
Notifications
You must be signed in to change notification settings - Fork 1
AutoComplete tips
Tristan edited this page Dec 7, 2018
·
8 revisions
Autocomplete that can be installed with:
$ complete -C /usr/local/bin/awskeyring awskeyring
To set your environment easily the following bash function helps:
awsenv() { eval "$(awskeyring env $@)"; }
And if you want autocompletion for the environment function try the following:
_awsenv_comp() {
COMPREPLY=( $(compgen -W "$(awskeyring list) --no-token" -- "${COMP_WORDS[COMP_CWORD]}" ))
}
complete -F _awsenv_comp awsenv
Related to autocomplete is autocorrection. if you have Thor 0.20-.3 or later and did_you_mean 1.0.3 and later installed and you make a typo you will get a helpful suggestion as to what should have been typed.
$ awskeyring halp
Could not find command "halp".
Did you mean? "help"