Skip to content

Instantly share code, notes, and snippets.

@obiwong
Created October 30, 2013 05:35
Show Gist options
  • Save obiwong/7227654 to your computer and use it in GitHub Desktop.
Save obiwong/7227654 to your computer and use it in GitHub Desktop.
copy current path to clipboard and switch to emacs
#!/bin/bash
if [ $# == 1 ]; then
echo -n `pwd`/$1 | xclip
wmctrl -a @Emacs || emacs23
else
echo -n `pwd` | xclip
wmctrl -a @Emacs || emacs23
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment