Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rezajax/a3b3fda3791044338ea0f1092c35c2ea to your computer and use it in GitHub Desktop.
Save rezajax/a3b3fda3791044338ea0f1092c35c2ea to your computer and use it in GitHub Desktop.
A few xclip aliases to simplify copying/pasting
# to simplify life, install xclip and append the following lines to your .bashrc
alias "c=xclip" # copy to X clipboard (register *)
alias "cs=xclip -selection clipboard" # copy to system wide clipboard (register +)
alias "v=xclip -o" # output copied content (paste)
alias "vs=xclip -o -selection clipboard" # paste from system wide clipboard (equivalent to `v -selection clipboard`)
# examples:
# copy to X:
# go to the same directory in terminal 2 as in terminal 1
# Terminal 1:
# pwd | c
# Terminal 2:
# cd `v`
# copy to system clipboard:
# cat file1 | cs
# Then simply ctrl+(shift)+V to paste to X windows
# paste from systen clipboard on command line:
# vs > file1copy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment