Pino Toscano
2016-May-03 12:13 UTC
[Libguestfs] [PATCH] mllib: add "internal" to the description of --{short, long}-options
The Arg module of OCaml does not support hiding options from the --help output: hence, mark --short-options and --long-options as internal options, since we need them only for the bash completion scripts. --- mllib/common_utils.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml index 3d6eb94..db8a298 100644 --- a/mllib/common_utils.ml +++ b/mllib/common_utils.ml @@ -575,8 +575,8 @@ let set_standard_options argspec let set_debug_gc () at_exit (fun () -> Gc.compact()) in let argspec = [ - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options"; - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; + "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options (internal)"; + "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options (internal)"; "-V", Arg.Unit print_version_and_exit, " " ^ s_"Display version and exit"; "--version", Arg.Unit print_version_and_exit, -- 2.5.5
Richard W.M. Jones
2016-May-03 12:20 UTC
Re: [Libguestfs] [PATCH] mllib: add "internal" to the description of --{short, long}-options
On Tue, May 03, 2016 at 02:13:34PM +0200, Pino Toscano wrote:> The Arg module of OCaml does not support hiding options from the --help > output: hence, mark --short-options and --long-options as internal > options, since we need them only for the bash completion scripts. > --- > mllib/common_utils.ml | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/mllib/common_utils.ml b/mllib/common_utils.ml > index 3d6eb94..db8a298 100644 > --- a/mllib/common_utils.ml > +++ b/mllib/common_utils.ml > @@ -575,8 +575,8 @@ let set_standard_options argspec > let set_debug_gc () > at_exit (fun () -> Gc.compact()) in > let argspec = [ > - "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options"; > - "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options"; > + "--short-options", Arg.Unit display_short_options, " " ^ s_"List short options (internal)"; > + "--long-options", Arg.Unit display_long_options, " " ^ s_"List long options (internal)"; > "-V", Arg.Unit print_version_and_exit, > " " ^ s_"Display version and exit"; > "--version", Arg.Unit print_version_and_exit, > -- > 2.5.5ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com libguestfs lets you edit virtual machines. Supports shell scripting, bindings from many languages. http://libguestfs.org
Reasonably Related Threads
- [PATCH 1/2] mllib: add and use set_standard_options
- Re: [PATCH 2/2] mllib: set --debug-gc as common option
- [PATCH 1/3] mllib: make few command line options stuff private
- [PATCH 2/2] mllib: set --debug-gc as common option
- [PATCH 0/3] mllib: Various fixes and changes to Getopt module.