[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnu-arch-users] Re: tla-bash-complete usability
From: |
Robert Anderson |
Subject: |
Re: [Gnu-arch-users] Re: tla-bash-complete usability |
Date: |
03 Sep 2003 08:50:03 -0700 |
On Tue, 2003-09-02 at 02:22, Jonas Diemer wrote:
> > but revision completion is also the most ressource
> > > intense task: The script would have to recursively get all existing
> > > versions, then get all revision for each version and finally
> > > concenate them together.
> >
> > I don't understand why. It should interactively complete each piece
> > of the version, so that when it comes time to list revisions, you only
> > have the revisions associated with that version. Ex:
> >
> > tla replay --exact cat[TAB]
> > cat--branch1
> > cat--branch2
> > tla replay --exact cat--branch1[TAB]
> > cat--branch1--1.0
> > cat--branch1--2.0
> > tla replay --exact cat--branch1--2.0[TAB]
> > cat--branch1--2.0--patch-3
> > ...
> > cat--branch1--2.0--patch-9
> >
>
> Yeah, that's right. But this will, however, bess up this completion:
>
> tla get [tab]
> <avaliable options>
> cat--branch1--2.0--patch-3
> ..
> cat--branch1--2.0--patch-9
> <all other revisions of other cats>
I don't think that's how it should work. I think it should complete
(full) versions in that context, and if the user wants revisions, he can
position his cursor at the end of the version name.
> And still, the tla-bash-complete script needs to return all possible
> revisions. Just returning all categories first (and later complete
> branch etc. based on $cur) will result in this behaviour:
>
> tla get ca[tab]
> tla get cat [tab]
>
> As you see, bash will complete cat but then add a space...
Offer the full version name. The space is actually ok IMO, since it
prevents manic [TAB] tapping from presenting the full revision list
without backing up a char first.
> There's probably a way around this, but I don't think its necessary
> (maybe later if -A is taken into respect and we try and complete for a
> remote archive).
>
> I have done full revision completion now (currently only for
> revisions|tag|cachedrevs|log-ls), you might wanna check that out.
For commands that take a version, even optionally, I think version
completion should be the default. Only if the cursor is positioned at
the end of the version should revisions be offered.
Bob