# HG changeset patch # User Jeff Hammel # Date 1442441359 25200 # Node ID f632a9850bb8f1d386e150556247eac4182223be # Parent 88f19ebb43eacef422d6002dfb550e71a8e51832 lookie, i can has x platform diff -r 88f19ebb43ea -r f632a9850bb8 .bashrc --- a/.bashrc Mon Aug 31 08:54:57 2015 -0700 +++ b/.bashrc Wed Sep 16 15:09:19 2015 -0700 @@ -29,7 +29,6 @@ export CLICOLOR=1 export EDITOR='emacs -nw' export JS_EDITLINE=1 -export JS_EDITLINE=1 # aliases alias awd="python -c 'import os; print (os.path.realpath(\".\"))'" @@ -65,6 +64,20 @@ export PATH=~/firefox:~/bin:~/bin/mozilla:~/python:$PATH:/usr/sbin:/usr/games/bin:~/virtualenv:~/silvermirror/bin:~/smartopen/bin:~/k0s/bin:~/docs/project/ims/workflow:~/cognet/bin:~/cognet/python export PYTHONPATH=~/python:$PYTHONPATH:~/virtualenv +# clipboard +if which xclip &> /dev/null +then + export CLIP_COPY="xclip -i" + export CLIP_PASTE="xclip -o" +elif which pbcopy &> /dev/null +then + export CLIP_COPY="pbcopy" + export CLIP_PASTE="pbpaste" +else + export CLIP_COPY="tee" + export CLIP_PASTE="true" +fi + ### functions gplot() { @@ -251,8 +264,8 @@ fn() { # put full name on clipboard and echo it - python -c "import os; print (os.path.realpath('$*'))" | xclip -i - xclip -o + python -c "import os; print (os.path.realpath('$*'))" | ${CLIP_COPY} + ${CLIP_PASTE} } swap() {