mirror of
https://codeberg.org/hyperreal/dotfiles
synced 2024-11-01 16:53:07 +01:00
12 lines
421 B
Fish
12 lines
421 B
Fish
function pubkey -d "Copy SSH pubkey to clipboard"
|
|
if type -q xclip
|
|
command cat "$HOME/.ssh/id_ed25519.pub" | command xclip -selection clipboard
|
|
command echo "==> SSH public key copied"
|
|
else if type -q xsel
|
|
command cat "$HOME/.ssh/id_ed25519.pub" | command xsel -ib
|
|
command echo "==> SSH public key copied"
|
|
else
|
|
command echo "ERROR: xclip or xsel not found"
|
|
end
|
|
end
|