aboutsummaryrefslogtreecommitdiff
path: root/src/command/cd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/command/cd.cc')
-rw-r--r--src/command/cd.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/command/cd.cc b/src/command/cd.cc
new file mode 100644
index 0000000..49b1899
--- /dev/null
+++ b/src/command/cd.cc
@@ -0,0 +1,19 @@
+#include "command/builtin.h"
+
+namespace ov4::command
+{
+
+using namespace std;
+
+void cd(char **argv)
+{
+ if (argv == nullptr) return;
+ if (argv[1] == nullptr)
+ {
+ cout << "cd: requires path" << endl;
+ return;
+ }
+ ov4::set_current_dir(argv[1]);
+}
+
+}