From d1200ca432038a34a9fa063244136e737ce47735 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 12 Dec 2015 23:37:11 +0100 Subject: Expose session PID and current working directory --- src/command/commands.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/command') 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.'); } } -- cgit v1.2.3