aboutsummaryrefslogtreecommitdiff
path: root/src/command/cd.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-09-01 07:58:49 +0000
committer_ov4 <ov4@ov4.org>2026-09-01 07:58:49 +0000
commit9a09c0bfc5956ed57fa4c26f84babb6778fa8a34 (patch)
tree9f11e72fa682dbaad744a4b617500d924e8436e4 /src/command/cd.cc
parentc1733952f1bbb567b335109f51fb66a73abfedd3 (diff)
path
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]);
+}
+
+}