14 lines
277 B
Fish
14 lines
277 B
Fish
#!/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" &>/dev/null && return 0
|
|
|
|
return 1
|
|
end
|