fix(chaipa): Remove pretty print to avoid clang-tidy / added the options in echo

This commit is contained in:
Jean 2026-01-31 15:40:46 +01:00
parent 3cd231f031
commit 182e31b42e
7 changed files with 106 additions and 34 deletions

View file

@ -67,7 +67,7 @@ int args_handler(int argc, char **argv, struct args_options *options,
{
options->type = INPUT_UNDEFINED;
options->input_source = NULL;
options->pretty_print = false;
// options->pretty_print = false;
options->verbose = false;
struct list *args_list = NULL;
@ -76,11 +76,11 @@ int args_handler(int argc, char **argv, struct args_options *options,
for (int i = 1; i < argc; i++)
{
if (strcmp(argv[i], "--pretty-print") == 0)
/* if (strcmp(argv[i], "--pretty-print") == 0)
{
options->pretty_print = true;
}
else if (strcmp(argv[i], "--verbose") == 0)
} */
if (strcmp(argv[i], "--verbose") == 0)
{
options->verbose = true;
}
@ -138,7 +138,7 @@ void args_print(struct args_options *options)
: "UNDEFINED");
printf("Input source: %s\n",
options->input_source ? options->input_source : "NULL");
printf("Pretty print: %s\n", options->pretty_print ? "true" : "false");
// printf("Pretty print: %s\n", options->pretty_print ? "true" : "false");
printf("Verbose: %s\n", options->verbose ? "true" : "false");
}
@ -147,7 +147,8 @@ void print_usage(FILE *std, const char *program_name)
fprintf(std, "Usage: %s [OPTIONS] [SCRIPT] [ARGUMENTS...]\n", program_name);
fprintf(std, "Options:\n");
fprintf(std, " -c [SCRIPT] Execute the given command string.\n");
fprintf(std, " --pretty-print Enable pretty printing of outputs.\n");
// fprintf(std, " --pretty-print Enable pretty printing of
// outputs.\n");
fprintf(std, " --verbose Enable verbose mode.\n");
fprintf(std,
"If no SCRIPT is provided, input is read from standard input.\n");