1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:57:46 +00:00

Userland: Write some '--help' descriptions where appropriate

This commit is contained in:
Ben Wiederhake 2020-12-05 16:22:58 +01:00 committed by Andreas Kling
parent 52a8062084
commit 4ec77ba929
32 changed files with 47 additions and 4 deletions

View file

@ -31,6 +31,7 @@
#include <AK/StringBuilder.h>
#include <LibCore/File.h>
#include <stdio.h>
#include <string.h>
static bool use_color = false;
static void print(const String& name, const JsonValue&, Vector<String>& trail);
@ -58,8 +59,9 @@ int main(int argc, char** argv)
return 1;
}
if (argc != 2) {
if (argc != 2 || !strcmp(argv[1], "--help")) {
fprintf(stderr, "usage: gron <file>\n");
fprintf(stderr, "Print each value in a JSON file with its fully expanded key.\n");
return 0;
}
auto file = Core::File::construct(argv[1]);