Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
executable file 18 lines (18 sloc) 458 Bytes
#!/bin/bash
if [[ "$OSTYPE" == darwin* ]]; then
pbcopy
elif [[ "$OSTYPE" == cygwin* ]]; then
cat > /dev/clipboard
elif [[ -n "$WSLENV" ]]; then
clip.exe
else
if type "xclip" &> /dev/null; then
xclip -in -selection clipboard
elif type "xsel" &> /dev/null; then
xsel --clipboard --input
elif [ -f "$ext_tmux_copy" ]; then
$ext_tmux_copy
else
echo "clipcopy: Platform $OSTYPE not supported or xclip/xsel not installed" >&2
fi
fi