From e72c4db0ca60e70775e98df0e61ff2fd1cc1af04 Mon Sep 17 00:00:00 2001 From: murat Date: Sat, 31 Jan 2026 18:19:04 +0300 Subject: [PATCH] feature: add proper --help output --- main.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/main.cpp b/main.cpp index 707bdb5..a171394 100644 --- a/main.cpp +++ b/main.cpp @@ -30,13 +30,22 @@ int main(int argc, char *argv[]) { for (int i = 0; i <= argc - 1; i++) { std::string arg = argv[i]; if (arg == "--help" || arg == "-h") { - cout << "help flag detected!"; + cout << + "ccolors - extract color palette from images\n\n" + "Usage:\n" + " " << argv[0] << " \n\n" + "Options:\n" + " -h, --help Show this help page\n\n" + "Output:\n" + " Prints dominant colors as HEX and terminal swatches\n" + " Also writes palette.json\n"; return 0; } } if (argc != 2) { - cout << "Please specify image file. " << argv[0] << " imagefile.jpg"; + cout << "Please specify a image file. " << argv[0] << " imagefile.jpg" + << "\nTry \"" << argv[0] << " --help\" for more information."; return 1; }