Add .config/fish/functions/copy-gpg-key.fish

This commit is contained in:
punkfairie 2024-04-17 19:12:20 -07:00
parent 6ee8cbffa2
commit 1c7787509d
No known key found for this signature in database
GPG key ID: 284B78B49C058673

View file

@ -0,0 +1,14 @@
#!/usr/bin/env fish
function copy-gpg-key
set -f key (\
gpg --list-secret-keys --keyid-format SHORT\
| grep 'rsa4096' \
| sed 's/sec rsa4096\///'\
| awk '{print $1}'\
)
copyq copy "$key" && return 0
return 1
end