Add support for TablePlus on macOS

https://tableplus.com/
This commit is contained in:
Eric Enold 2023-05-25 14:58:46 +02:00
parent 44d6661496
commit ef4ec60ad6

View file

@ -148,6 +148,9 @@ run_client() {
if [ -d "/Applications/Sequel Ace.app" ] && [ "${USE_CLI}" != true ]
then
open "mysql://$2:$3@${SQL_PROXY_HOST}:6033/${4}" -a "Sequel Ace"
elif [ -d "/Applications/TablePlus.app" ] && [ "${USE_CLI}" != true ]
then
open "mysql://$2:$3@${SQL_PROXY_HOST}:6033/${4}" -a "TablePlus"
elif which mysql >/dev/null 2>&1
then
mysql --protocol=TCP -u "$2" -p"$3" -h "${SQL_PROXY_HOST}" "${4:+-D$4}" -P 6033
@ -156,7 +159,10 @@ run_client() {
fi
elif [ "$1" = 'postgres' ]
then
if which psql >/dev/null 2>&1
if [ -d "/Applications/TablePlus.app" ] && [ "${USE_CLI}" != true ]
then
open "postgresql://$2:$3@${SQL_PROXY_HOST}:6033/${4:-postgres}" -a "TablePlus"
elif which psql >/dev/null 2>&1
then
psql "postgresql://$2:$3@${SQL_PROXY_HOST}:6033/${4:-postgres}"
else