gnulib-tool-py
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnulib-tool-py] Command-line parse and options


From: Dmitriy Selyutin
Subject: Re: [gnulib-tool-py] Command-line parse and options
Date: Mon, 30 Apr 2012 02:34:27 +0400

Hi Bruno,

> I try to answer rapidly, but sometimes it takes me longer. Sorry about that.
It is sometimes hard to translate Russian jokes to English. :-) That's not an accusation, that's a joke in Russian. Sorry if I seemed to be rough, we might misunderstand each other.

> gnulib-tool --usage
That's why I ask. Typing `./gnulib-tool --usage` outputs
  gnulib-tool: unknown option --usage
  Try 'gnulib-tool --help' for more information.

`./gnulib-tool --version` says (I quote here only the first line):
  gnulib-tool (GNU gnulib 2012-04-29 21:45:26) 0.0.7341-40ab1

Typing simple `./gnulib-tool` says
  ./gnulib-tool: *** no mode specified
  ./gnulib-tool: *** Stop.

Is there a little bug or am I misunderstanding what you want to say?


2012/4/30 Bruno Haible <address@hidden>
Hi Dmitriy,

> It seems that I've solved compatibility problems with strings and bytes. It
> was too late, Bruno, when your letter came

I try to answer rapidly, but sometimes it takes me longer. Sorry about that.

> Now there is another question. I need to get some information about
> command-line options. It would be great if you tell me some details:
> 1) --list, --find, --import, --add-import, --remove-import, --update,
> --create-testdir, --create-megatestdir, --test, --copy-file, --extract-*.
> Are they overwriting? i.e. can only one option be set? As I see from source
> code, there is variable mode which is set equivalent to mode, but I need to
> be sure.

The "gnulib-tool --usage" text lists these as different "operation modes"
(together with --help and --version). This means that exactly one of these
options should be given.

Currently the last one to be mentioned "wins". This is suboptimal; it would
be better to reject command lines like
 ./gnulib-tool --extract-description --list
or
 ./gnulib-tool --import --find
The only exception to this rule is that '--help' may win against all others.
(Many GNU programs work like this, try 'ls --help -l' and 'ls -l --help'.)

I hope this is easier to implement in Python than it would be in shell script.

> 2) I need all what you can say about other arguments. It would be great if
> there is something like architecture.odg and functions.odt files, but I'll
> be very grateful for any information.

The "gnulib-tool --usage" text tries to say it:
 - "Operation mode" means that exactly one of these should be specified.
 - "General options" means options that can apply to all modes.
 - "Options for --import, --add/remove-import, --update" are allowed
   only for --import, --add-import, --remove-import, --update. Etc.

Bruno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]