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

Re: [Fwd: bash completion for subversion]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2004-11-08 23:44:43 CET

Brian W. Fitzpatrick wrote:
> Philip,
>
> I've just tested this out, and it works as expected. What do you
> think? Do you want to replace your script with this or just have it
> live side-by-side? Let me know what you think and I'll commit it.

This runs "svn" (or "svnadmin") every time you ask for a completion, which is slow.

This doesn't remove unambiguous abbreviations such as "up" from its list of
candidates, despite the comment that says it does. Thus if you ask for
completion of "up", it offers "up" and "update" whereas the more useful thing
is to just complete it as "update".

This script starts with "#!/bin/sh" but (a) it is Bash-specific, and (b)
there's no point in being able to run it as a program, it has to be sourced
in-line by the instance of Bash that wants the completion. So that line should
be removed.

It would be nice if you could attach this with MIME type text/plain rather than
application/octet-stream.

We would probably want to remove the CVS/RCS keyword lines if we store this in
the Subversion repository.

Last year I thought about doing this. In the end I used this method to write a
script (bash_completion_check) to check the correctness of the bash_completion
script.

In short, -0.9. Good idea but not there yet.

- Julian

> BTW, is there any reason not to just add 'shopt -s extglob' to the top?

The same dilemma applies to the existing "bash_completion" script. The script
must be sourced in-line, so 'shopt -s extglob' must be active in the user's
shell for this completion to work, yet if a user has that option unset for good
reason it's not necessarily our place to activate that option.

> -----Forwarded Message-----
> From: Martin Blais <martin.blais@gmail.com>
> To: dev@subversion.tigris.org
> Subject: bash completion for subversion
> Date: Sun, 07 Nov 2004 23:57:41 -0500
>
> a little potential contribution: i took the bash completion file for
> subversion and modified it so that it uses the output of subversion
> itself to provide the completions, similar in idea to optcomplete
> (http://furius.ca/optcomplete). the idea is that the completions will
> never go out-of-sync with whatever version of subversion you have
> installed (well, unless the help format changes, which i estimate to
> be unlikely).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 8 23:45:10 2004

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