Expose current session dir (#15)
* expose the current working directory * test current dir interface Co-authored-by: rbn42 <bl100@students.waikato.ac.nz>
This commit is contained in:
@@ -943,6 +943,18 @@ QString Session::foregroundProcessName()
|
||||
return name;
|
||||
}
|
||||
|
||||
QString Session::currentDir()
|
||||
{
|
||||
QString path;
|
||||
if (updateForegroundProcessInfo()) {
|
||||
bool ok = false;
|
||||
path= _foregroundProcessInfo->currentDir(&ok);
|
||||
if (!ok)
|
||||
path.clear();
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
bool Session::updateForegroundProcessInfo()
|
||||
{
|
||||
Q_ASSERT(_shellProcess);
|
||||
|
||||
Reference in New Issue
Block a user