Displaying 20 results from an estimated 20 matches for "list_set_format".
2016 Jul 18
0
[PATCH 3/3] builder: improve the handling of list formats
...@ let parse_cmdline () =
let format = ref "" in
let gpg = ref "gpg" in
- let list_format = ref `Short in
- let list_set_long () = list_format := `Long in
+ let list_format = ref List_entries.Short in
+ let list_set_long () = list_format := List_entries.Long in
let list_set_format arg =
- 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_argu...
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))
2016 Jun 16
1
[PATCH] builder: Fix description for --long option
...le templates";
- "--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format short";
+ "--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format long";
"--list-format", Arg.String list_set_format,
"short|long|json" ^ " " ^ s_"Set the format for --list (default: short)";
"--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable";
--
2.5.5
2014 Jan 16
0
[PATCH 2/3] builder: add --list-format
...sertions(+), 4 deletions(-)
diff --git a/builder/cmdline.ml b/builder/cmdline.ml
index f199f03..6d6439f 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -132,6 +132,13 @@ let parse_cmdline () =
let list_format = ref `Short in
let list_set_long () = list_format := `Long in
+ let list_set_format arg =
+ list_format := match arg with
+ | "short" -> `Short
+ | "long" -> `Long
+ | fmt ->
+ eprintf (f_"%s: invalid --list-format type '%s', see the man page.\n") prog fmt;
+ exit 1 in
let memsize = ref None in
let set_me...
2014 Jan 16
5
[PATCH 0/3] Add JSON output for virt-builder
Hi,
This small patch serie adds a JSON output for virt-builder.
This way it is possible to parse the list of available templates,
with no need to parse the unstructured and possibly changing short and
long outputs of virt-builder.
Pino Toscano (3):
builder: small refactor of the list output
builder: add --list-format
builder: add a JSON output for --list
builder/builder.ml
2014 Jan 16
0
[PATCH 3/3] builder: add a JSON output for --list
...uot;) prog fmt;
exit 1 in
@@ -265,7 +266,7 @@ let parse_cmdline () =
"--list", Arg.Unit list_mode, ditto;
"--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format short";
"--list-format", Arg.String list_set_format,
- "short|long" ^ " " ^ s_"Set the format for --list (default: short)";
+ "short|long|json" ^ " " ^ s_"Set the format for --list (default: short)";...
2016 Jul 15
5
[PATCH 0/3] mllib: Various fixes and changes to Getopt module.
The second patch is obviously not complete yet - for discussion only.
Rich.
2018 Aug 20
0
[PATCH 2/2] OCaml tools: simplify machine-readable handling
...t 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-format" ], Getopt.Symbol (formats_string, formats, list_set_format),
s_"Set the format for --list (default: short)";
- [ L"machine-readable" ], Getopt.Set machine_readable, s_"Make output machine readable";
[ S 'm'; L"memsize" ], Getopt.Int ("mb",...
2016 Jul 18
0
[PATCH v2 2/3] mllib: Use L"..." and S '...' for long and short options.
...t;-l"; "--list" ], Getopt.Unit list_mode, s_"List available templates";
- [ "--long" ], Getopt.Unit list_set_long, s_"Shortcut for --list-format long";
- [ "--list-format" ], Getopt.String ("short|long|json", list_set_format),
+ [ L"gpg" ], Getopt.Set_string ("gpg", gpg), s_"Set GPG binary/command";
+ [ S 'l'; L"list" ], Getopt.Unit list_mode, s_"List available templates";
+ [ L"long" ], Getopt.Unit list_set_long,...
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
2015 Aug 31
2
[PATCH 1/2] mllib: add and use set_standard_options
...der/cmdline.ml
index 49435ae..1537208 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -126,8 +126,6 @@ let parse_cmdline () =
"--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format short";
"--list-format", Arg.String list_set_format,
"short|long|json" ^ " " ^ s_"Set the format for --list (default: short)";
- "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options";
- "--long-options",...
2016 Jul 18
4
[PATCH v2 0/3] mllib: Various fixes and changes to Getopt module.
v1 -> v2:
- Further fixes to Getopt int parsing.
- Completed the L/S changes.
- Fixed the test suite so it passes now. Also we don't need the
special-case tests for 64 bit arch.
Rich.
2016 Jul 18
3
[PATCH v4 0/2] mllib: Various fixes and changes to Getopt module.
v3 -> v4:
- Pushed the first patch upstream since it was ACKed.
- Prevent use of M except for the special virt-v2v options.
- Sort the options after added --help etc.
- Make corresponding fixes to the tests.
Rich.
2016 Jul 18
4
[PATCH v3 0/3] mllib: Various fixes and changes to Getopt module.
v2 -> v3:
- Add M variant and test it.
Rich.
2014 Nov 26
5
[PATCH] tools: implement --short-options
...der/cmdline.ml
index e21d5bb..bb7b1d0 100644
--- a/builder/cmdline.ml
+++ b/builder/cmdline.ml
@@ -135,6 +135,7 @@ let parse_cmdline () =
"--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format short";
"--list-format", Arg.String list_set_format,
"short|long|json" ^ " " ^ s_"Set the format for --list (default: short)";
+ "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options";
"--long-options",...
2016 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
...lates";
> - "--list", Arg.Unit list_mode, " " ^ s_"List available templates";
> - "--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format long";
> - "--list-format", Arg.String list_set_format,
> - "short|long|json" ^ " " ^ s_"Set the format for --list (default: short)";
> - "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable";
> - "...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...available templates";
- "--list", Arg.Unit list_mode, " " ^ s_"List available templates";
- "--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format long";
- "--list-format", Arg.String list_set_format,
- "short|long|json" ^ " " ^ s_"Set the format for --list (default: short)";
- "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable";
- "-m",...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...available templates";
- "--list", Arg.Unit list_mode, " " ^ s_"List available templates";
- "--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format long";
- "--list-format", Arg.String list_set_format,
- "short|long|json" ^ " " ^ s_"Set the format for --list (default: short)";
- "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable";
- "-m",...
2016 Jul 13
3
[PATCH v3 1/2] OCaml tools: add and use a Getopt module
...available templates";
- "--list", Arg.Unit list_mode, " " ^ s_"List available templates";
- "--long", Arg.Unit list_set_long, " " ^ s_"Shortcut for --list-format long";
- "--list-format", Arg.String list_set_format,
- "short|long|json" ^ " " ^ s_"Set the format for --list (default: short)";
- "--machine-readable", Arg.Set machine_readable, " " ^ s_"Make output machine readable";
- "-m",...
2014 Mar 18
2
[PATCH] customize: Move virt-customize-related code to a separate
There's not going to be an easy way to present this patch. It's huge
and interconnected.
Anyway, what it does is lay the groundwork for a new tool which I'm
calling 'virt-customize'. virt-customize is virt-builder, but without
the part where it downloads a template from a respository. Just the
part where it customizes the template, that is, installing packages,
editing