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

Re: subversion and programmable completion

From: Sebastien Cevey <seb_at_cine7.net>
Date: 2003-07-25 18:22:18 CEST

On Mon, Jul 21, 2003 at 06:52:48PM -0400, Clint Adams wrote:

> > The bash completion does not use the content of 'svn help'
> > AFAIK. (we're talking about the script in tools/client-side/ right?).
>
> The only bash completion for subversion that I've seen is
> /etc/bash_completion.d/subversion in the Debian subversion package,
> which I assume is that to which you refer.

Actually no, I refer to the bash_completion file from the svn
repository here :

http://svn.collab.net/repos/svn/trunk/tools/client-side/bash_completion

It could be that Debian has taken this file as well, I don't know.

> I seem to recall Adam Heath doing some work on emulating zsh
> completion functions in bash. Perhaps he could encapsulate the zsh
> functions somehow.

What I thought of as "improved completion" was not really taking
arguments from the `svn help` output, but also to guess what files
(for instance) would fit the command.

e.g. :

$ ls -1
foo/
bar.txt
blank.txt
$ svn st
M foo/test.txt
? bar.txt

Then `svn add ` +TAB would expand to bar.txt, since there the other
files and directories do not have to be added (they are already known
to svn). The same goes for `svn revert ` +TAB that would only expand
to foo/test.txt since the other files are either up to date or not in
the repository.

It is really some kind of "completion candy", and it can take some
time if the `svn status` command is slow (many files, etc), but I
thought that it could be a nice feature anyway (maybe as an
alternative bash_completion file).

Has anybody tried this already ?

-- 
Sebastien Cevey <seb@cine7.net>
Cine7.Net  -  Milcis.Net  -  ProgramPlay.Org
Jabber: theefer@albus.homelinux.net - ICQ: 48895760
" Rosebud... "
Orson Welles (Charles F. Kane) [ Citizen Kane ]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 25 18:23:29 2003

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

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