mirror of
https://github.com/ViViDboarder/shoestrap.git
synced 2025-01-22 04:44:20 +00:00
Add yk-copy function
This commit is contained in:
parent
4a0732afbc
commit
ac5937f118
13
assets/default/fish/functions/yk-copy.fish
Normal file
13
assets/default/fish/functions/yk-copy.fish
Normal 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
|
Loading…
x
Reference in New Issue
Block a user