File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed
Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change 11cite ' about-alias'
2- about-alias ' pbcopy and pbpaste shortcuts to linux'
2+ about-alias ' xclip shortcuts to linux'
33
4- case $OSTYPE in
5- linux* )
6- XCLIP=$( command -v xclip)
7- [[ $XCLIP ]] && \
8- alias pbcopy=" $XCLIP -selection clipboard" && \
9- alias pbpaste=" $XCLIP -selection clipboard -o" && \
10-
11- alias xcpy=" $XCLIP -selection clipboard" && \
12- alias xpst=" $XCLIP -selection clipboard -o"
13- ;;
14- esac
4+ if _command_exists xclip;
5+ alias pbcopy=" xclip -selection clipboard"
6+ alias pbpaste=" xclip -selection clipboard -o"
157
8+ alias xcpy=" xclip -selection clipboard"
9+ alias xpst=" xclip -selection clipboard -o"
10+ fi
1611# to use it just install xclip on your distribution and it would work like:
1712# $ echo "hello" | pbcopy
1813# $ pbpaste
You can’t perform that action at this time.
0 commit comments