Add environment variable $KONSOLE_PROFILE_NAME

It records the name of the profile used in current tab/session.

FEATURE: 227296
FIXED-IN:4.9
This commit is contained in:
Jekyll Wu
2012-01-23 23:57:08 +08:00
parent f1c4879fd6
commit debfec2eb3

View File

@@ -466,6 +466,7 @@ void SessionManager::applyProfile(Session* session, const Profile::Ptr profile ,
// (if specified)
QStringList environment = profile->property<QStringList>(Profile::Environment);
environment << QString("PROFILEHOME=%1").arg(profile->defaultWorkingDirectory());
environment << QString("KONSOLE_PROFILE_NAME=%1").arg(profile->name());
session->setEnvironment(environment);
}