Created
July 16, 2013 23:45
-
-
Save trobrock/6016291 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef knife_ssh | |
#autoload | |
_knife_ssh() { | |
if hash knife 2>/dev/null; then | |
if [[ ! -f ~/.knife_comp~ ]]; then | |
echo "\nGenerating ~/.knife_comp~..." >/dev/stderr | |
knife node list > ~/.knife_comp~ | |
fi | |
compadd `cat ~/.knife_comp~` | |
else | |
echo "Could not find knife" > /dev/stderr; | |
fi | |
} | |
_knife_ssh "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment