git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Blaisorblade <blaisorblade@yahoo.it>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: Ben Clifford <benc@hawaga.org.uk>, git@vger.kernel.org
Subject: Re: latest stg/git commandline completions code
Date: Tue, 25 Oct 2005 17:53:19 +0200	[thread overview]
Message-ID: <200510251753.20164.blaisorblade@yahoo.it> (raw)
In-Reply-To: <tnxwtk1lj58.fsf@arm.com>

On Tuesday 25 October 2005 17:18, Catalin Marinas wrote:
> Blaisorblade <blaisorblade@yahoo.it> wrote:
> > I'm using stgit on the Linux kernel so when on a command I don't have tab
> > completion I add the needed one (having the time and feeling to do
> > it).

> You can have a look at the tlacontrib project scripts (I can forward
> them to you since you would need tla/baz to clone/checkout the project
> and this procedure is a combination of 'tag' and 'get' commands). They
> automatically generate the commands together with the options and are
> later used in completion.

> Of course, your approach would work as well but it requires more
> maintance.

_Yes_, it wasn't ever intended to be published, and the help output doesn't 
seem, at a quick look, trivially parsable (the source is better to parse but 
I refuse that. Also, some options require still a special handling.

The best idea seems to write a Python script sourcing the Stgit source 
(stgit/main.py to get commands, and then loading each class and iterating 
over the "options" module member). I'm not fluent in Python enough currently, 
but when I'll find time I'll probably study a bit reflection and write this 
down (my Python experience amounts to some random readings on reviews and a 
couple of days with Python docs).

> >> if so, do you have any more formalised distribution process (like a
> >> git repo!) rather than grabbing code out of email list postings? I
> >> can't seem to find much on google...

> > Well, Catalin's TODO included "bash completions", so I assume the
> > thing could be merged by him. Anyway, I'm attaching the current
> > version.

> When you think it is ready, I'm happy to include it (though I would
> prefer a more dynamic approach like the tla one but since I don't have
> time for it I'll just use yours).

Btw, what do you think about speeding up completions by reimplementing things 
like "stg applied" or "stg unapplied" via cat (as noted in the comments at 
the beginning of the script)? Tab completions can easily livelock a shell on 
a busy system, so it's worthy speeding the thing up.

> Thanks.

-- 
Inform me of my mistakes, so I can keep imitating Homer Simpson's "Doh!".
Paolo Giarrusso, aka Blaisorblade (Skype ID "PaoloGiarrusso", ICQ 215621894)
http://www.user-mode-linux.org/~blaisorblade

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it

  reply	other threads:[~2005-10-25 16:05 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.4.60.0510251222510.8565@mundungus.clifford.ac>
2005-10-25 14:42 ` latest stg/git commandline completions code Blaisorblade
2005-10-25 15:18   ` Catalin Marinas
2005-10-25 15:53     ` Blaisorblade [this message]
2005-10-25 16:24       ` Catalin Marinas
2005-10-25 17:05         ` Blaisorblade
2005-10-26 11:34           ` Catalin Marinas
2005-10-26 16:14             ` Blaisorblade
2005-11-08 10:16   ` Ben Clifford
2005-11-09 22:23     ` Petr Baudis
2005-11-10  1:59       ` Ben Clifford
2005-11-10  9:40         ` Petr Baudis
2005-11-16  3:35           ` Ben Clifford
2005-11-10  2:03       ` Ben Clifford
2005-11-10  6:57       ` Ben Clifford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200510251753.20164.blaisorblade@yahoo.it \
    --to=blaisorblade@yahoo.it \
    --cc=benc@hawaga.org.uk \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).