diff --git a/src/session/Session.cpp b/src/session/Session.cpp index f6f9067f..0035dad0 100644 --- a/src/session/Session.cpp +++ b/src/session/Session.cpp @@ -1104,7 +1104,10 @@ QString Session::getDynamicTitle() bool ok = false; if (process->name(&ok) == QLatin1String("ssh") && ok) { SSHProcessInfo sshInfo(*process); - return sshInfo.format(tabTitleFormat(Session::RemoteTabTitle)); + QString title = tabTitleFormat(Session::RemoteTabTitle); + title.replace(QLatin1String("%w"), userTitle()); + title.replace(QLatin1String("%#"), QString::number(sessionId())); + return sshInfo.format(title); } /* @@ -1124,6 +1127,9 @@ QString Session::getDynamicTitle() * 'bob' would be returned) * *
  • %D - Replaced with the current working directory of the process.
  • + *
  • %h - Replaced with the local host name.
  • + *
  • %w - Replaced with the window title set by the shell.
  • + *
  • %# - Replaced with the number of the session.
  • * */ QString title = tabTitleFormat(Session::LocalTabTitle); @@ -1145,6 +1151,9 @@ QString Session::getDynamicTitle() title.replace(QLatin1String("%h"), Konsole::ProcessInfo::localHost()); title.replace(QLatin1String("%n"), process->name(&ok)); + title.replace(QLatin1String("%w"), userTitle()); + title.replace(QLatin1String("%#"), QString::number(sessionId())); + QString dir = _reportedWorkingUrl.toLocalFile(); ok = true; if (dir.isEmpty()) {