aboutsummaryrefslogtreecommitdiff
path: root/src/command/builtin.cc
diff options
context:
space:
mode:
author_ov4 <ov4@ov4.org>2026-09-01 00:39:44 +0000
committer_ov4 <ov4@ov4.org>2026-09-01 00:39:44 +0000
commit5e94ca9f060d2952ef08913234c500a815f734bf (patch)
tree169e6c67289b70753aa76edb818f3b1f63112884 /src/command/builtin.cc
parent54261d62d47624e9ff4724c42aaa05eaf478e606 (diff)
refactor
Diffstat (limited to 'src/command/builtin.cc')
-rw-r--r--src/command/builtin.cc23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/command/builtin.cc b/src/command/builtin.cc
new file mode 100644
index 0000000..b2c3149
--- /dev/null
+++ b/src/command/builtin.cc
@@ -0,0 +1,23 @@
+#include "command/builtin.h"
+
+namespace ov4
+{
+
+using namespace std;
+
+//array<string> builtin_cmd_list{"quit", "fg", "bg", "jobs"};
+
+/*
+ * builtin_cmd - If the user has typed a built-in command then execute
+ * it immediately.
+ */
+bool exe_bultin_command(char **argv)
+{
+ if (argv == nullptr || argv[0] == nullptr) exit(1); // WTF???
+ if (strcmp(argv[0], "quit") == 0) { ov4::command::quit(); return true; }
+ else return false;
+}
+
+
+
+}