Skip to content

Instantly share code, notes, and snippets.

@marcusmoore
Forked from AlexVanderbist/opendb-ddev.sh
Created September 24, 2020 02:55
Show Gist options
  • Save marcusmoore/f4c01add7c5a9b21a10ef4c9e312ef1a to your computer and use it in GitHub Desktop.
Save marcusmoore/f4c01add7c5a9b21a10ef4c9e312ef1a 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