mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
10 lines
301 B
Bash
10 lines
301 B
Bash
# function to send text to primary and secondary clipboards
|
|
sendtoclip() {
|
|
if (( $+commands[xclip] )); then
|
|
echo -n $@ | xclip -sel primary
|
|
echo -n $@ | xclip -sel clipboard
|
|
elif (( $+commands[xsel] )); then
|
|
echo -n $@ | xsel -ip # primary
|
|
echo -n $@ | xsel -ib # clipboard
|
|
fi
|
|
}
|