#!/bin/bash
# https://github.com/mooz/percol
# percol is an interactive grep tool in your terminal.
sudo pip install percol

# http://blog.binchen.org/posts/how-to-do-the-file-navigation-efficiently.html
# add to .zshrc or .bashrc
# function pclip() {
#     if [ -x /usr/bin/xsel ]; then
#         xsel -ib $@;
#     else
#         if [ -x /usr/bin/xclip ]; then
#             xclip -selection c $@;
#         else
#             echo "Neither xsel or xclip is installed!"
#         fi
#     fi
# }
# function ff() {
#     local fullpath=$*
#     local filename=${fullpath##*/} # remove "/" from the beginning
#     filename=${filename##*./} # remove  ".../" from the beginning
#     echo file=$filename
#     #  only the filename without path is needed
#     # filename should be reasonable
#     local cli=`find $PWD -not -iwholename '*/target/*' -not -iwholename '*.svn*' -not -iwholename '*.git*' -not -iwholename '*.sass-cache*' -not -iwholename '*.hg*' -type f -iwholename '*'${filename}'*' -print | percol`
#     echo ${cli}
#     echo -n ${cli} | pclip;
#}
