From ef4ec60ad661b7f32906e95a0f82d82b913f5a0f Mon Sep 17 00:00:00 2001 From: Eric Enold Date: Thu, 25 May 2023 14:58:46 +0200 Subject: [PATCH] Add support for TablePlus on macOS https://tableplus.com/ --- script/myssh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/script/myssh b/script/myssh index b8c9c41..4c3b995 100755 --- a/script/myssh +++ b/script/myssh @@ -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