diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/command/commands.js | 12 | ||||
-rw-r--r-- | src/widget/EmbeddedTerminal.qml | 5 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/command/commands.js b/src/command/commands.js index 2ec1bb6..13bb1c2 100644 --- a/src/command/commands.js +++ b/src/command/commands.js @@ -115,12 +115,12 @@ function q() { Qt.quit(); } -function cd(output, path) { - if ( path.length > 0 ) { - if ( !workingDirectory.cd(path) ) { - output.error('\"' + path + '\" doesn\'t exist.'); - } +function pwd(output) { + var terminal = terminalList.getCurrent().terminal; + + if ( terminal !== null ) { + output.log(cwd.currentOfPID(terminal.getPID())); } else { - output.log(workingDirectory.current()); + output.error('No running session selected.'); } } diff --git a/src/widget/EmbeddedTerminal.qml b/src/widget/EmbeddedTerminal.qml index 8a326ef..67d9a91 100644 --- a/src/widget/EmbeddedTerminal.qml +++ b/src/widget/EmbeddedTerminal.qml @@ -12,12 +12,13 @@ Item { property int lines : settings.terminal.initialLines property alias history : session.history + function getPID() { return session.getShellPID() } + function terminate() { return session.sendSignal(15) } + function select() { highlighter.select() } function deselect() { highlighter.deselect() } function displayOverlay() { overlay.displayBriefly() } - function terminate() { return session.sendSignal(15) } - height: terminal.height width: parent.width - settings.terminal.frameWidth |