Skip to content

Commit

Permalink
Add vlt helper function for vault
Browse files Browse the repository at this point in the history
  • Loading branch information
lbarratt committed May 4, 2018
1 parent 11fec1b commit dbd84e1
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions zsh/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,18 @@ alias s.='subl .'
# Ruby
alias be='bundle exec'

# PHP crap
alias composer='php /usr/bin/composer.phar'
# Vault Helpers
function vlt {
list=$(vault list secret/$1 2<&1)

if [ $? -ne 0 ]; then

if [ -n "$2" ]; then
vault read -field=$2 secret/$1
else
vault read secret/$1
fi
else
echo "$list"
fi
}

0 comments on commit dbd84e1

Please sign in to comment.