Allow loading ssh-keys using peco
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
c669a296fa
commit
0fef2abc09
1 changed files with 10 additions and 0 deletions
10
.zsh/peco.sh
10
.zsh/peco.sh
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue