mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2025-01-22 13:54:22 +00:00
14 lines
392 B
Fish
14 lines
392 B
Fish
|
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
|