aboutsummaryrefslogtreecommitdiff
path: root/src/command/builtin.cc
diff options
context:
space:
mode:
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;
+}
+
+
+
+}