search for: list_format_of_string

Displaying 4 results from an estimated 4 matches for "list_format_of_string".

2016 Jul 18
0
[PATCH 3/3] builder: improve the handling of list formats
...list_format := match arg with - | "short" -> `Short - | "long" -> `Long - | "json" -> `Json - | fmt -> - error (f_"invalid --list-format type '%s', see the man page") fmt in + (* Do not catch the Invalid_argument that list_format_of_string + * throws on invalid input, as it is already checked by the + * Getopt handling of Symbol. *) + list_format := List_entries.list_format_of_string arg in let machine_readable = ref false in @@ -118,6 +116,9 @@ let parse_cmdline () = let sync = ref true in let warn_if_partiti...
2016 Jul 18
4
[PATCH 1/3] mllib: Getopt: point to man page as additional help
On error, point also to the man page of the current tool in addition to '$TOOL --help'. --- mllib/getopt-c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mllib/getopt-c.c b/mllib/getopt-c.c index bf40f91..3efd5d3 100644 --- a/mllib/getopt-c.c +++ b/mllib/getopt-c.c @@ -69,8 +69,8 @@ cleanup_option_list (void *ptr) static void __attribute__((noreturn))
2018 Aug 20
0
[PATCH 2/2] OCaml tools: simplify machine-readable handling
...iles changed, 26 insertions(+), 53 deletions(-) diff --git a/builder/cmdline.ml b/builder/cmdline.ml index fa8a83d3e..9c854ed49 100644 --- a/builder/cmdline.ml +++ b/builder/cmdline.ml @@ -104,8 +104,6 @@ let parse_cmdline () = * Getopt handling of Symbol. *) list_format := List_entries.list_format_of_string arg in - let machine_readable = ref false in - let memsize = ref None in let set_memsize arg = memsize := Some arg in @@ -155,7 +153,6 @@ let parse_cmdline () = [ L"long" ], Getopt.Unit list_set_long, s_"Shortcut for --list-format long"; [ L"list-...
2018 Aug 20
2
[PATCH 1/2] mlstdutils/mltools: factorize the machine-readable option
Store the machine-readable flag globally, just like done for verbose/debug/etc, and enhance create_standard_options to provide --machine-readable automatically. --- common/mlstdutils/std_utils.ml | 4 ++++ common/mlstdutils/std_utils.mli | 7 +++++-- common/mltools/tools_utils.ml | 7 ++++++- common/mltools/tools_utils.mli | 5 ++++- 4 files changed, 19 insertions(+), 4 deletions(-) diff