[PATCH] Command abbreviations and aliases

Martin Pool mbp at sourcefrog.net
Fri Apr 15 09:11:29 BST 2005


On Fri, 2005-04-15 at 16:49 +1000, Michael Ellerman wrote:
> Hi Martin, Jason,
> 
> I've adapted Jason's patch so that we don't have to explicitly specify
> abbreviations like "st" => "status", we work them out by looking through the
> list of commands. That also gives us "sta" => "status", "stat" => "status"
> etc.

Thanks, but I think I agree with Fredrik that this would be too likely
to give confusing results as we change the command set.  I don't mind
adding lots of aliases though.

> I thought it might be expensive to scan all of globals() looking for names
> that start with the command we've been given, but it turns out to be
> negligble.

Of course globals() is only globals for the current module, so it's not
really all that big.

-- 
Martin

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050415/4c37fd5f/attachment.pgp 


More information about the bazaar mailing list