Skip to content

Instantly share code, notes, and snippets.

@syui
Created July 31, 2014 05:58
Show Gist options
  • Save syui/fafe05df50c753b15e3d to your computer and use it in GitHub Desktop.
Save syui/fafe05df50c753b15e3d to your computer and use it in GitHub Desktop.
# curl -O https://gist.githubusercontent.com/richmikan/3251311/raw/290c70b9a45b5eb66036b83de79bfe6bb0b3b054/parsrx.sh
function searchClipBoard() {
cclip=`plutil -convert xml1 ~/Library/Application\ Support/ClipMenu/clips.data -o - | parsrx.sh | grep '/plist/dict/array/string ' | sed '1,2d' | sed 's/\/plist\/dict\/array\/string//g' | peco`
echo $cclip | pbcopy
}
zle -N searchClipBoard
bindkey '^x^p' searchClipBoard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment