mirror of
https://github.com/KDE/konsole.git
synced 2025-12-23 23:38:08 -05:00
Show non-default Port in full host name (%H) in tab bar
Makes it easy to spot several connections to the same host on different ports (e.g. different controllers on the same embedded device)
This commit is contained in:
committed by
Tomaz Canabrava
parent
7ceb93a376
commit
e7d93d906f
@@ -189,7 +189,12 @@ QString SSHProcessInfo::format(const QString &input) const
|
||||
output.replace(QLatin1String("%h"), _host.left(_host.indexOf(QLatin1Char('.'))));
|
||||
}
|
||||
|
||||
output.replace(QLatin1String("%H"), _host);
|
||||
QString fullHost = _host;
|
||||
if (!_port.isEmpty() && _port != QLatin1String("22")) {
|
||||
fullHost.append(QLatin1Char(':'));
|
||||
fullHost.append(_port);
|
||||
}
|
||||
output.replace(QLatin1String("%H"), fullHost);
|
||||
output.replace(QLatin1String("%c"), _command);
|
||||
|
||||
return output;
|
||||
|
||||
Reference in New Issue
Block a user