Adding credit to the author of vault completion

pull/823/head
Ilan Erenstein 2016-11-04 09:20:11 -07:00
parent 120b1616d5
commit 8ac4093276
1 changed files with 3 additions and 1 deletions

View File

@ -1,3 +1,5 @@
# Credit https://github.com/iljaweis/vault-bash-completion/
function _vault() {
local VAULT_COMMANDS='delete path-help read renew revoke server status write audit-disable audit-enable audit-list auth auth-disable auth-enable capabilities generate-root init key-status list mount mount-tune mounts policies policy-delete policy-write rekey remount rotate seal ssh step-down token-create token-lookup token-renew token-revoke unmount unseal version'
@ -13,7 +15,7 @@ function _vault() {
local cur=${COMP_WORDS[COMP_CWORD]}
local line=${COMP_LINE}
if [ "$(echo $line | wc -w)" -le 2 ]; then
if [[ "$line" =~ ^vault\ (read|write|delete|list)\ $ ]]; then
COMPREPLY=($(compgen -W "$VAULT_ROOTPATH" -- ''))