1
0
mirror of https://github.com/Eugeny/tabby.git synced 2025-08-13 21:01:52 +00:00

detect user@domain style usernames in ssh quick connect - fixes

This commit is contained in:
Eugene Pankov
2021-03-13 21:02:49 +01:00
parent d03211631a
commit c290633e7e

@@ -420,7 +420,9 @@ export class SSHService {
let host = query let host = query
let port = 22 let port = 22
if (host.includes('@')) { if (host.includes('@')) {
[user, host] = host.split('@') const parts = host.split(/@/g)
host = parts[parts.length - 1]
user = parts.slice(0, parts.length - 1).join('@')
} }
if (host.includes(':')) { if (host.includes(':')) {
port = parseInt(host.split(':')[1]) port = parseInt(host.split(':')[1])