github.com/drud/ddev@v1.21.5-alpha1.0.20230226034409-94fcc4b94453/pkg/ddevapp/global_dotddev_assets/commands/host/tableplus (about)

     1  #!/bin/bash
     2  
     3  #ddev-generated
     4  # Support for TablePlus, https://tableplus.com/
     5  # This command is available if macOS and TablePlus is installed in the normal place
     6  ## Description: Run tableplus with current project database
     7  ## Usage: tableplus
     8  ## Example: "ddev tableplus"
     9  ## OSTypes: darwin
    10  ## HostBinaryExists: /Applications/TablePlus.app
    11  
    12  dbtype=${DDEV_DBIMAGE%:*}
    13  driver=mysql
    14  if [[ $dbtype == "postgres" ]]; then
    15      driver=$dbtype
    16  fi
    17  query="${driver}://db:db@127.0.0.1:${DDEV_HOST_DB_PORT}/db"
    18  
    19  set -x
    20  open "$query" -a "/Applications/TablePlus.app/Contents/MacOS/TablePlus"
    21