mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 08:02:24 +00:00
Quick connect merged the typed line over a matching `~/.ssh/config` alias by asking whether the parsed port was 22. Port 22 is also what the parser fills in when nothing named a port, so `myalias -p 22` against an alias carrying `Port 2222` read as silence and connected to 2222. Checked against the reference: `ssh -G -F cfg -p 22 myalias` reports port 22, the command line outranking the config file. The parser already knew — it tracks `Option<u16>` and only collapses it at the end — so the answer is carried out as `port_given` rather than recovered from a value that cannot hold it. The merge itself moves out of the event handler into `merge_typed_ssh_over_alias`, which is what let this be tested at all: the rule is now stated in one place and covered for the typed `:22` spelling, the silent case, an ordinary non-default port, and no alias at all. The other `port == 22` comparisons are display code deciding whether to print `:22`, which is correct and unchanged.