Add yk-copy function

This commit is contained in:
ViViDboarder 2025-01-16 12:48:50 -08:00
parent 4a0732afbc
commit ac5937f118

View File

@ -0,0 +1,13 @@
function yk-copy --description "Select a credential using fzf and copy it to clipboard"
set result (yk (yk list | fzf))
if command -q pbcopy
echo "$result" | pbcopy
else if command -q xsel
echo "$result" | xsel --clipboard
else if command -q xclip
echo "$result" | xclip
else
echo "No clipboard command found. Code is $result"
end
end