search for: list_set_long

Displaying 20 results from an estimated 22 matches for "list_set_long".

2016 Jun 16
1
[PATCH] builder: Fix description for --long option
...^ s_"Set GPG binary/command"; "-l", Arg.Unit list_mode, " " ^ s_"List available templates"; "--list", Arg.Unit list_mode, " " ^ s_"List available 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, "sh...
2014 Jan 16
0
[PATCH 2/3] builder: add --list-format
...4 +++++++++++++++++++++--- 2 files changed, 31 insertions(+), 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; + ex...
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
2016 Jul 18
0
[PATCH 3/3] builder: improve the handling of list formats
...at : [`Short|`Long|`Json]; + list_format : List_entries.format; memsize : int option; network : bool; ops : Customize_cmdline.ops; @@ -88,15 +88,13 @@ 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"...
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))
2017 Apr 06
1
[PATCH v2] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).
...= ref "gpg" in + let gpg = + try which "gpg2" + with Executable_not_found _ -> + try which "gpg" + with Executable_not_found _ -> + "" in + let gpg = ref gpg in let list_format = ref List_entries.Short in let list_set_long () = list_format := List_entries.Long in diff --git a/builder/virt-builder.pod b/builder/virt-builder.pod index b48b1241b..dbbd6469e 100644 --- a/builder/virt-builder.pod +++ b/builder/virt-builder.pod @@ -314,8 +314,10 @@ F</boot> directory of a guest, see L<virt-copy-out(1)>. =item...
2017 Apr 04
2
[PATCH] builder: Allow GnuPG v2 or v1 to be used (RHBZ#1438939).
...ml +++ b/builder/cmdline.ml @@ -87,7 +87,7 @@ let parse_cmdline () = let add_fingerprint arg = push_front arg fingerprints in let format = ref "" in - let gpg = ref "gpg" in + let gpg = ref Guestfs_config.gnupg in let list_format = ref List_entries.Short in let list_set_long () = list_format := List_entries.Long in diff --git a/docs/guestfs-building.pod b/docs/guestfs-building.pod index 5e314b34d..b29fcc4ab 100644 --- a/docs/guestfs-building.pod +++ b/docs/guestfs-building.pod @@ -280,10 +280,25 @@ Optional. For the L<UML backend|guestfs(3)/BACKEND>. Optional...
2014 Jan 16
0
[PATCH 3/3] builder: add a JSON output for --list
...quot; -> `Json | fmt -> eprintf (f_"%s: invalid --list-format type '%s', see the man page.\n") 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)"; +...
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
...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-format" ], Getopt.Symbol (formats_string, formats, list_set_format), s_"Set the format for --list (default: short)"; - [ L"machine-readable" ], Getopt.Set...
2016 Jul 18
0
[PATCH v2 2/3] mllib: Use L"..." and S '...' for long and short options.
...image"; - [ "--gpg" ], Getopt.Set_string ("gpg", gpg), s_"Set GPG binary/command"; - [ "-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"li...
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
...| 14 +++----------- 10 files changed, 39 insertions(+), 105 deletions(-) diff --git a/builder/cmdline.ml b/builder/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-opt...
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
...format; } else if (STREQ (long_options[option_index].name, "uuid")) { diff --git a/builder/cmdline.ml b/builder/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-opt...
2016 Jun 27
0
Re: [PATCH] RFC: OCaml tools: add and use a Getopt module
...GPG binary/command"; > - "-l", Arg.Unit list_mode, " " ^ s_"List 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)"; > - &qu...
2016 Jun 24
2
[PATCH] RFC: OCaml tools: add and use a Getopt module
...^ s_"Set GPG binary/command"; - "-l", Arg.Unit list_mode, " " ^ s_"List 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-re...
2016 Jul 11
2
[PATCH v2] OCaml tools: add and use a Getopt module
...^ s_"Set GPG binary/command"; - "-l", Arg.Unit list_mode, " " ^ s_"List 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-re...