Merge pull request #448 from mimoralea/pbpaste-linux
Add aliases to copy to and paste from clipboard on the terminal for linu...pull/450/head
commit
f6a64d397f
|
|
@ -0,0 +1,18 @@
|
|||
cite 'about-alias'
|
||||
about-alias 'pbcopy and pbpaste shortcuts to linux'
|
||||
|
||||
case $OSTYPE in
|
||||
linux*)
|
||||
XCLIP=$(command -v xclip)
|
||||
[[ $XCLIP ]] && alias pbcopy="$XCLIP -selection clipboard" && alias pbpaste="$XCLIP -selection clipboard -o"
|
||||
;;
|
||||
esac
|
||||
|
||||
# to use it just install xclip on your distribution and it would work like:
|
||||
# $ echo "hello" | pbcopy
|
||||
# $ pbpaste
|
||||
# hello
|
||||
|
||||
# very useful for things like:
|
||||
# cat ~/.ssh/id_rsa.pub | pbcopy
|
||||
# have fun!
|
||||
Loading…
Reference in New Issue