Commit d424d145 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Try to catch ssh command arguments for tab titles

When using 'ssh server command args', try to gather the command args
for use in the tab titles. This doesn't work 100% and suggest using
quotes around the ssh command.

Patch by Tobias Berner tcberner gmail com

Part of REVIEW 127525
parent 2c936769
......@@ -1077,6 +1077,10 @@ private:
SSHProcessInfo::SSHProcessInfo(const ProcessInfo& process)
: _process(process)
, _user(QString())
, _host(QString())
, _port(QString())
, _command(QString())
{
bool ok = false;
......@@ -1166,8 +1170,17 @@ SSHProcessInfo::SSHProcessInfo(const ProcessInfo& process)
_host = args[i];
}
} else {
// host has already been found, this must be the command argument
_command = args[i];
// host has already been found, this must be part of the
// command arguments.
// Note this is not 100% correct. If any of the above
// noArgumentOptions or singleArgumentOptions are found, this
// will not be correct (example ssh server top -i 50)
// Suggest putting ssh command in quotes
if (_command.isEmpty()) {
_command = args[i];
} else {
_command = _command + QString(' ') + args[i];
}
}
}
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment