Skip to content

Instantly share code, notes, and snippets.

@krishicks
Last active February 5, 2018 19:01
Show Gist options
  • Save krishicks/87b5bc2f158a2974affe3a82a866485c to your computer and use it in GitHub Desktop.
Save krishicks/87b5bc2f158a2974affe3a82a866485c to your computer and use it in GitHub Desktop.
goto (fish)
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