subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Ferbar <ch...@qnipp.com>
Subject Re: bash_completion - subversion add: svn ls/merge ^/<remote path>
Date Wed, 19 Aug 2015 15:39:03 GMT
Hello,

this patch works for svn ls and svn merge now. I'm not sure if it makes sense for other commands,
however it is a separate function an can be used easily for other commands as well.

_svn_lls() looks broken for me because ${dn}.svn/text-base/${fn}.svn-base doesn't exist any
more

I suggest to enable SVN_BASH_COMPL_EXT=urls by default since nobody reads a documentation
and enables it.

greetings, Chris


Am Dienstag, 18. August 2015, 13:51:58 schrieb Julian Foad:
> Christian Ferbar wrote:
> > new version. This patch are my current changes for "svn ls" only.
> 
> Thanks, Chris. This looks much better already. (I haven't tried it.)
> 
> > I need some feedback concerning:
> >
> > -> how to deal with svn error messages written to stderr, for example:
> > svn ls svn+ssh://svn.something.com/<tab><tab>user@svn.something.com's
password:
> >
> > this happens when you forget to do ssh-add
> 
> I suggest it should simply not provide any completions that cannot be
> obtained without further input. Use --non-interactive so that
> Subversion does not prompt for passwords. Prevent any stderr output
> being printed to the console (maybe use "2> /dev/null"). Then make
> sure the script behaves OK (just returning no completions) when
> Subversion returns an error. You might need to look for a non-zero
> exit code explicitly, but maybe not: it might be enough to just try
> parsing the stdout and if there is no recognizable stdout then you get
> no resulting completions.
> 
> > -> in bash >= 4 they changed COMP_WORDS. The Line will be split at : as well,
so "file:/something" are 3 array items. Nobody would use subversion 1.9 with bash 3 ... probably.
I will drop bash 3 statements, for example:
> >
> > if [[ $cur == file:* ]]
> >
> > ok?
> 
> Dropping support for Bash 3 sounds OK to me, if it is difficult to
> keep it working. Especially good if only the URL completion depends on
> Bash 4 and all the rest of the existing kinds of completion keep
> working with Bash 3.
> 
> >> Please can URL completion work on full URLs as well as on relative URLs?
> > for SVN LS this is done:
> >
> > 1. svn ls tabtab                           -> ^/ file:/// http:// https:// svn://
svn+ssh://
> > 2. svn ls svn+ssh://tabtab         -> will look at the ~/.ssh/known_hosts
> > 3. svn ls http[s]://tabtab             -> lookup in ~/.subversion/simple-auth
- should still be working
> > 4. svn ls proto://server/tabtab or  ^/tabtab -> autocomplete via "svn ls"
> 
> Excellent, that looks like the sort of thing I was hoping for.
> 
> - Julian

Mime
View raw message