diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-06-18 23:05:23 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-06-18 23:05:23 +0200 |
commit | 11ee207cc10e72aa96fad4715b14a84c686ad480 (patch) | |
tree | bc98d60bb59ab0fdc183c6673fe8fe143fd367bc /config/essentials/zsh/functions.zsh | |
parent | 305c8e8ff1fc4a76fb42151105e119e8266df57c (diff) | |
parent | 8c5d85923a970bd60657848e1c2c6f627c4329d9 (diff) |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'config/essentials/zsh/functions.zsh')
-rw-r--r-- | config/essentials/zsh/functions.zsh | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/config/essentials/zsh/functions.zsh b/config/essentials/zsh/functions.zsh index 8b7dbef..3243750 100644 --- a/config/essentials/zsh/functions.zsh +++ b/config/essentials/zsh/functions.zsh @@ -86,13 +86,6 @@ clip () { fi } -fzh () { - choice="$(tac $HOME/.config/zsh/histfile | fzf)" - test -z "${choice}" && return - echo "${choice}" >> "${HOME}/.config/zsh/histfile" - eval "${choice}" -} - unzipp () { file=$1 shift @@ -110,10 +103,10 @@ esc () { } delfile () { - curl ${2:-"https://up.kallipso.be/delete/$1"} + curl "${2:-https://up.kallipso.be/delete/$1}" } upfile () { - curl -F "file=@\"$1\"" ${2:-"https://up.kallipso.be"} + curl -F "file=@\"$1\"" ${2:-http://0x0.st} } sgd () { @@ -238,3 +231,22 @@ mime-default () xargs -I {} xdg-mime default "$1" "{}" die "Done." } + +addedkeys () { + find ~/.ssh -iname "*.pub" | while read key + do + local fingerprint="$(ssh-keygen -lf "$key" 2>/dev/null)" + if ssh-add -l | grep -q "$fingerprint" + then + echo "$key" + fi + done | sed "s,$HOME/.ssh/,," +} + +fpass () { + find $HOME/.password-store -type f -not -path ".git" | + grep "\.gpg$" | + sed "s,$HOME/.password-store/,,;s,\.gpg$,," | + fzf | + xargs pass show -c +} |