Last active
November 2, 2015 21:58
-
-
Save jimjh/ae987c92e3bd8d0d0fff to your computer and use it in GitHub Desktop.
zsh autocompletion for vault's subcommands
This file contains 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 vault | |
# See https://vaultproject.io/ | |
# Drop this file in ~/.oh-my-zsh/completions/_vault | |
subcommands=$(vault --help 2|& grep -E '^\s{4}' | awk '{printf $1; $1=""; print "\\:\x27"$0"\x27"}') | |
_arguments "1:subcommand:((${subcommands}))" | |
_message 'vault [-version] [-help] <command> [args]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment