mirror of
https://github.com/kovidgoyal/kitty
synced 2026-06-08 14:18:26 +02:00
SSH does not parse port from hostname when not using a ssh:// URL
This commit is contained in:
@@ -136,7 +136,7 @@ func TestSSHConfigParsing(t *testing.T) {
|
|||||||
u, _ := user.Current()
|
u, _ := user.Current()
|
||||||
un := u.Username
|
un := u.Username
|
||||||
for _, x := range []Pair{
|
for _, x := range []Pair{
|
||||||
{"localhost:12", un, "localhost"},
|
{"localhost:12", un, "localhost:12"},
|
||||||
{"@localhost", un, "@localhost"},
|
{"@localhost", un, "@localhost"},
|
||||||
{"ssh://@localhost:33", un, "localhost"},
|
{"ssh://@localhost:33", un, "localhost"},
|
||||||
{"me@localhost", "me", "localhost"},
|
{"me@localhost", "me", "localhost"},
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ func get_destination(hostname string) (username, hostname_for_match string) {
|
|||||||
_, hostname_for_match, _ = strings.Cut(hostname, "@")
|
_, hostname_for_match, _ = strings.Cut(hostname, "@")
|
||||||
parsed = true
|
parsed = true
|
||||||
}
|
}
|
||||||
hostname_for_match, _, _ = strings.Cut(hostname_for_match, ":")
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user