aboutsummaryrefslogtreecommitdiff
path: root/src/command/commands.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/commands.js')
-rw-r--r--src/command/commands.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/command/commands.js b/src/command/commands.js
index 732eb5b..2ec1bb6 100644
--- a/src/command/commands.js
+++ b/src/command/commands.js
@@ -114,3 +114,13 @@ function prev() {
function q() {
Qt.quit();
}
+
+function cd(output, path) {
+ if ( path.length > 0 ) {
+ if ( !workingDirectory.cd(path) ) {
+ output.error('\"' + path + '\" doesn\'t exist.');
+ }
+ } else {
+ output.log(workingDirectory.current());
+ }
+}