diff options
author | pommicket <pommicket@gmail.com> | 2022-12-30 22:54:31 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-30 22:54:31 -0500 |
commit | 74ca500fcad9f6f1ee2d43498b92beee92112fb0 (patch) | |
tree | 364404844a07d9ffc67469754156f6405c71d335 /main.c | |
parent | 37275ad25635624161c3b51bc81cbd431a200e0c (diff) |
better readme, etc
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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)) |