[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Patch for bash-completion that enables Subversion completion

From: Josh Glover <josh.glover_at_tfcci.com>
Date: 2004-07-28 16:03:12 CEST

Quoth Jacob Atzen (Tue 2004-07-27 10:19:12PM +0200):

> On Tue, Jul 27, 2004 at 12:47:55PM -0400, Josh Glover wrote:
> > bash-completion has pretty advanced completion for CVS, and I *really*
> > missed it when I switched to SVN a couple of weeks ago.
> Could you please highlight the features you've built?

Sure. So far, all it does is complete a few "global" options to the svn
command itself, (actually, I just noticed from looking at the SVN book,
*all* options are global, so I had better fix that!) all subcommands,
and, for each subcommand, all valid options, according to
'svn help <subcommand>'.

> One really nifty thing I found was that when doing "svn add [tab]" it
> will only list files not yet under version control unless there's no
> such files.

This is a planned feature.

> Unfortunately the same doesn't seem to apply to the svn remove or diff
> commands. And it get's real bad with svn rename which won't tabcomplete
> filenames at all.

Yes, this is a nasty side-effect of bad completion code, when you lose the
minimal completion that the shell already offers. :(

As for planned features, here is the list:

- Complete only files (and directories) *not* already under Subversion
  control for:
 - add
 - import
- Complete only files (and directories) already under Subversion control
  for all other subcommands with a PATH or TARGET argument (except status,
  since you might want to know that a certain file *is not* under SVN
- Remote repository completion for all subcommands that have a URL or
  TARGET argument, e.g. blame, cat, checkout, etc
- Appropriate completion for switches
- Complete subcommands for help
- Completion for svnadmin and svnlook

I will use the Debian code (thanks, everyone who forwarded that to me)
as a reference, but I like the version-portability property of my code
generator so much that I think I will stick with it.

Any and all feedback is welcome.


Josh Glover <josh.glover@tfcci.com>
Software Engineer
Twenty First Century Communications, Inc.
GPG keyID 0x22111305 (E210 61C6 14DF B480 C211  AE2A 0F12 1D7B 2211 1305)
gpg --keyserver pgp.mit.edu --recv-keys 22111305

  • application/pgp-signature attachment: stored
Received on Wed Jul 28 16:03:41 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.