summaryrefslogtreecommitdiff
path: root/config/essentials/zsh/functions.zsh
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-06-18 23:05:23 +0200
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-06-18 23:05:23 +0200
commit11ee207cc10e72aa96fad4715b14a84c686ad480 (patch)
treebc98d60bb59ab0fdc183c6673fe8fe143fd367bc /config/essentials/zsh/functions.zsh
parent305c8e8ff1fc4a76fb42151105e119e8266df57c (diff)
parent8c5d85923a970bd60657848e1c2c6f627c4329d9 (diff)
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'config/essentials/zsh/functions.zsh')
-rw-r--r--config/essentials/zsh/functions.zsh30
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
+}