summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-30 22:54:31 -0500
committerpommicket <pommicket@gmail.com>2022-12-30 22:54:31 -0500
commit74ca500fcad9f6f1ee2d43498b92beee92112fb0 (patch)
tree364404844a07d9ffc67469754156f6405c71d335 /main.c
parent37275ad25635624161c3b51bc81cbd431a200e0c (diff)
better readme, etc
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/main.c b/main.c
index 3e947ae..818017e 100644
--- a/main.c
+++ b/main.c
@@ -368,6 +368,14 @@ int main(int argc, char **argv) {
switch (argc) {
case 0: case 1: break;
case 2:
+ if (streq(argv[1], "--help")) {
+ printf("%s\n", TED_VERSION_FULL);
+ printf("Usage: ted [file name]\n");
+ exit(0);
+ } else if (streq(argv[1], "--version")) {
+ printf("%s\n", TED_VERSION_FULL);
+ exit(0);
+ }
// essentially, replace / with \ on windows.
for (char *p = argv[1]; *p; ++p)
if (strchr(ALL_PATH_SEPARATORS, *p))