Philippe Bergheaud wrote:

Inconsistencies:
   Library cannot be specified for each argument.
   Item cannot be specified for each sha1 checksum argument.
   Version cannot be specified with -V Version.

Ambiguities:
   Relative Unix path without '.' or '/' looks like Item or Version.
   Main node Version without '.' looks like Item.

Idea #1:

The syntax [Library]:Item would help.
One should also be able to alias Library to a local nickname.

In fact, enforcing ':' in all dim namespace specifications really help.
:Item, :Version, :Item-Version would discriminate from Unix pathname.

This convention would add a new (but decent) restriction:
Relative Unix path containing ':' but no '/' would have to be prefixed with './'.

Note:
getopts(3) also demands '--' or './' prefixing for Unix path starting with '-' or '+'.

Idea #2:

:[Item]-Version would discriminate Item from Version, Version from flag.
   :a   # Item
   :a1    # Item
   :-a    # Version (assuming the last digit constraint has been lifted)
   :-a1   # Version
   :+1    # Version
   -a   # flag
   -a1   # flags (-a -1)
   +1   # flag
   a   # Relative pathname
   a1   # Relative pathname
   1   # Relative pathname

This convention would ease the integration with other tools
(expecting standard Unix flag and pathname conventions).

Suppressing ambiguities would also simplify argument parsing.

Philippe
--
Archive: http://www.mail-archive.com/dim@ml.free.fr/
To unsubscribe: mailto:[EMAIL PROTECTED]

Reply via email to