Last active
February 5, 2018 19:01
-
-
Save krishicks/87b5bc2f158a2974affe3a82a866485c to your computer and use it in GitHub Desktop.
goto (fish)
This file contains 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
function goto --description 'goto in GOPATH' | |
for p in (string split ':' $GOPATH) | |
set f (find $p/src -type d | grep $argv | head -n 1) | |
if test -n "$f" | |
cd $f | |
return | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment