Created
October 21, 2014 08:17
-
-
Save mrnugget/82edacc1a2501841fb6a to your computer and use it in GitHub Desktop.
Use fzz to interactively find a file and then `cd` to the directory of the top result
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
| cdfzz() { | |
| local file=$(fzz find . -iname "*{{}}*" | head -n 1) | |
| local filedir=$(dirname ${file}) | |
| cd ${filedir} | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment