Created
March 1, 2015 06:23
-
-
Save benevolent0505/3fd2e5298ecd02b5d822 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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