gnu-arch-users
[Top][All Lists]
Advanced

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

Re: [Gnu-arch-users] tla bash completion


From: Jason McCarty
Subject: Re: [Gnu-arch-users] tla bash completion
Date: Thu, 28 Aug 2003 10:33:12 -0400
User-agent: Mutt/1.3.28i

[I've been working on a rather ad hoc Z-Shell completion for tla]

Jonas Diemer wrote:
> Doing the script myself, I've found some inconsistencies in the tla options:

I've seen some of those too, but I felt like waiting for the (still
not-guaranteed) option language thingy before trying to improve that,
since it should be possible to auto-generate most of the completion
script at that point.

> 1. the option -d usually is equivalent to --dir, but sometimes (e.g. tla 
> register-archive), -d means --delete. This is not only confusing but also 
> hard to implement in my bash script so I'd like to hear your thoughts on 
> this. In my oppinion, -d should not be used as a shortcut to --delete. There 
> are several other examples of such inconsistencies. I suggest to never have 
> shortcuts whith different meanings in different contexts. Either use 
> capitalization to distinguish between different shortcuts starting with the 
> same name or not use a shortcut at all, because the status quo is very 
> misleading.

As for single-letter options, there are only so many letters, and if you
use letters that don't obviously correspond to the name of the option,
they don't serve as well as mnemonic devices.  My decision was to not
offer short option completions; I figure if the user remembers the short
option he can just type it in, and if he doesn't, being able to tab-
complete the long option is nearly as good (zsh explains the meaning of
options when offering completions).  However, there are still a few long
options with the same name but with different meanings.

> 2. Some commands use -q|--quiet to make them shut up (e.g. tla what-changed), 
> some use -s|--silent (e.g. tla tree-root). I don't know if there is a 
> slightly different meaning to those to variations of "shut up", but if not I 
> suggest to unify them.

I agree; -v, -vv, etc might serve as alternatives.

Jason




reply via email to

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