This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository eshell.
View the commit online.
commit d5611ac5acee60155349c178f3ede6ee461e1eaf
Author: swagtoy <m...@ow.swag.toys>
AuthorDate: Thu Oct 17 13:11:14 2024 -0400
Commit my argument parsing code for now
There's some other code for the actual parser, but at the moment this is just to make the project seem alive
---
.gitignore | 1 +
eshell/src/main.c | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..567609b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+build/
diff --git a/eshell/src/main.c b/eshell/src/main.c
new file mode 100644
index 0000000..086eebe
--- /dev/null
+++ b/eshell/src/main.c
@@ -0,0 +1,39 @@
+#include <Ecore.h>
+#include <Ecore_Getopt.h>
+
+static const Ecore_Getopt options = {
+ "Eshell",
+ "%prog [options] <filename>",
+ "0.1",
+ "2023 Enlightenment",
+ "BSD 3-Clause",
+ "A powerful shell scripting language",
+ 1,
+ {
+ ECORE_GETOPT_STORE_STR('M', "module", "Module(s) to load"),
+ ECORE_GETOPT_VERSION('V', "version"),
+ ECORE_GETOPT_COPYRIGHT('R', "copyright"),
+ ECORE_GETOPT_LICENSE('L', "License"),
+ ECORE_GETOPT_HELP('h', "Help"),
+ ECORE_GETOPT_SENTINEL,
+ }
+};
+
+int
+main(int argc, char** argv)
+{
+ char* module = 0;
+ unsigned char help = 0;
+ Ecore_Getopt_Value values[] = {
+ ECORE_GETOPT_VALUE_STR(module),
+ ECORE_GETOPT_VALUE_NONE,
+ ECORE_GETOPT_VALUE_NONE,
+ ECORE_GETOPT_VALUE_NONE,
+ ECORE_GETOPT_VALUE_BOOL(help),
+ ECORE_GETOPT_VALUE_NONE,
+ };
+
+ ecore_app_args_set(argc, (const char**)argv);
+ int args = ecore_getopt_parse(&options, values, argc, argv);
+ return 0;
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.