Skip to content

Instantly share code, notes, and snippets.

@AlexVanderbist
Created September 17, 2020 16:39
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save AlexVanderbist/3c127033d10eb461ef245a0a09bca890 to your computer and use it in GitHub Desktop.
Save AlexVanderbist/3c127033d10eb461ef245a0a09bca890 to your computer and use it in GitHub Desktop.
opendb for ddev
opendb () {
unset GREP_OPTIONS
PORT="$(ddev describe | ggrep -Pio "(?<=port=)[0-9]*")"
open mysql://db:db@127.0.0.1:${PORT}/db
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment