Skip to content

Instantly share code, notes, and snippets.

@benevolent0505
Created March 1, 2015 06:23
Show Gist options
  • Save benevolent0505/3fd2e5298ecd02b5d822 to your computer and use it in GitHub Desktop.
Save benevolent0505/3fd2e5298ecd02b5d822 to your computer and use it in GitHub Desktop.
# peco find directory
function peco_find
if git rev-parse --is-inside-work-tree > /dev/null 2>&1
git rev-parse --show-toplevel | read search_root
else
pwd | read search_root
end
find $search_root -maxdepth 5 | peco | read -l file_path
commandline -i $file_path
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment