Adding credit to the author of vault completion
parent
120b1616d5
commit
8ac4093276
|
|
@ -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" -- ''))
|
||||
|
|
|
|||
Loading…
Reference in New Issue