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

Re: URL completion via 'svn ls' in bash_completion - call for advice

From: Tim Connor <timocratic_at_gmail.com>
Date: 2007-03-24 18:00:32 CET

Trying this again, through the google groups interface, since my first
two attemps choked. Sorry for the repeat Fabien.

--
Ya, it's a little slow, comparatively, but as you point out, only
happens upon user request (TAB).  Hell, they have to have
bash_completion installed and the latest completion script, which is
going to eliminate the average Mac user altogether (I run OS X, and
just got this working on my system) ;).  That's besides the point,
though.  I guess if it were really an issue it could be commented out,
so only the people who really wanted it on had it.
The only reason I had to fallback to sed (I guess there are people
runnign bash_complete that don't have sed, in theory) is that I am a
bash newbie, and couldn't figure out how else to deal with the CWORD
(the path) being replaced with directory path, other than prepending
the path to each result, and couldn't figure out how to do that in
pure bash.  Once I got into partial completion territory and thus
having to find the parent directory of the current partially completed
path I was definitely going to be beyond my oure bash skills.  I mean
at this point I was sticking to limiting it to only the http protocol,
for programming simplicity, until the functionality was more
developed.
Password request - hmm, good question.  The next thing I was going to
try and figure out was the possibility of hostname complete (based
upon the auth files, or $HOSTFILE?).  If that were already in I guess
one could only complete on known hosts.  The non-interactive option
sounds interesting, but what do you do then - only allow URL
completion if non-interactive is set?  Or there is again the
#advanced users only/commenting out approach and bombing out if svn ls
returns a prompt.
For those that are aware of the limitations though, it's REALLY nice
to be able to browse the repo to the path you want while typing a
command.
Tim
On Mar 24, 1:11 am, Fabien COELHO <fab...@coelho.net> wrote:
> Dear Tim,
>
> > I've improved my try from earlier to actually work - at least for http
> > directory paths.  If you tab complete on an argument that is an
> > http://*/ then it will query 'svn ls' and autocomplete based on that.
>
> This is costly, but on the other hand the user requests it...
>
> Another issue is what happens if a login/password is asked for? That could
> stuck the completion function. Possibly the '--non-interactive' option
> might be useful.
>
> Also, I do not like at all the idea of relying on 'sed': the function is
> pure bash at the time, and adding an external dependency does not seem
> desirable.
>
> I'll look into it.
>
> --
> Fabien.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@subversion.tigris.org
> For additional commands, e-mail: dev-h...@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 24 18:00:54 2007

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.