Allow loading ssh-keys using peco

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-02-11 13:02:38 +01:00
parent c669a296fa
commit 0fef2abc09
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -11,6 +11,16 @@ function peco-kill-process() {
} }
alias killp='peco-kill-process' alias killp='peco-kill-process'
# load ssh-key
function peco-load-ssh-key() {
local keys
keys=$(vault list secret/ssh-key | tail -n+3 | peco --query "$LBUFFER")
if [ -n "${keys}" ]; then
echo "${keys}" | xargs vault-sshadd
fi
}
alias psshkey='peco-load-ssh-key'
# select history # select history
function peco-select-history() { function peco-select-history() {
local tac local tac