You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Philip Martin <ph...@codematters.co.uk> on 2005/08/25 18:09:04 UTC

Re: svn commit: r15902 - trunk/tools/client-side

kfogel@tigris.org writes:

> Author: kfogel
> Date: Thu Aug 25 10:48:36 2005
> New Revision: 15902
>
> Modified:
>    trunk/tools/client-side/bash_completion
>
> Log:
> * tools/client-side/bash_completion: Fix syntax errors, see issue #2387.
>
> Patch by: Nicolas Vilz <de...@tigris.org>
> (Tweaked by me to remove some unrelated changes.)
>
>
> Modified: trunk/tools/client-side/bash_completion
> Url: http://svn.collab.net/viewcvs/svn/trunk/tools/client-side/bash_completion?rev=15902&p1=trunk/tools/client-side/bash_completion&p2=trunk/tools/client-side/bash_completion&r1=15901&r2=15902
> ==============================================================================
> --- trunk/tools/client-side/bash_completion	(original)
> +++ trunk/tools/client-side/bash_completion	Thu Aug 25 10:48:36 2005
> @@ -39,9 +39,9 @@
>  	# if not typing an option, or if the previous option required a
>  	# parameter, then fallback on ordinary filename expansion
>  	helpCmds='help|--help|h|\?'
> -	if [[ ${COMP_WORDS[1]} != @($helpCmds) ]] && \
> +	if [[ ${COMP_WORDS[1]} != @${helpCmds} ]] && \
>  	   [[ "$cur" != -* ]] || \
> -	   [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]] ; then
> +	   [[ ${COMP_WORDS[COMP_CWORD-1]} == @${optsParam} ]] ; then
>  		return 0
>  	fi
>  

Those are not syntax errors, they are uses of the extended pattern
matching operator.  Extended pattern matching is a bash feature that
can be enabled/disabled, if you are getting syntax errors I guess you
have it disabled.  See the note at the top of the file.  I don't know
what @$ means, but I'm pretty sure it doesn't work here.

I seem to recall a similar patch in the dim and distant past, perhaps
we need a comment nearer the lines in question?

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r15902 - trunk/tools/client-side

Posted by Philip Martin <ph...@codematters.co.uk>.
kfogel@collab.net writes:

> I am but a vessel.  Say "yes" if you would you like me to make this

I discovered some missing options so I just committed the lot.

> change, say "dudelsackpfeiffer' otherwise.

Bagpipes?

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r15902 - trunk/tools/client-side

Posted by kf...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:
> > But I wonder, why shouldn't we just put
> > 'shopt -s extglob progcomp' at the top of the file, before the '_svn()'?
> 
> Interesting idea.  How about we do extglob only, that would avoid the
> syntax errors, and leave progcomp up to the user?

I am but a vessel.  Say "yes" if you would you like me to make this
change, say "dudelsackpfeiffer' otherwise.

(Makes sense to me, though.)


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r15902 - trunk/tools/client-side

Posted by Philip Martin <ph...@codematters.co.uk>.
kfogel@collab.net writes:

> But I wonder, why shouldn't we just put
> 'shopt -s extglob progcomp' at the top of the file, before the '_svn()'?

Interesting idea.  How about we do extglob only, that would avoid the
syntax errors, and leave progcomp up to the user?

-- 
Philip Martin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r15902 - trunk/tools/client-side

Posted by kf...@collab.net.
I wrote:
> Philip Martin <ph...@codematters.co.uk> writes:
> > Those are not syntax errors, they are uses of the extended pattern
> > matching operator.  Extended pattern matching is a bash feature that
> > can be enabled/disabled, if you are getting syntax errors I guess you
> > have it disabled.  See the note at the top of the file.  I don't know
> > what @$ means, but I'm pretty sure it doesn't work here.
> > 
> > I seem to recall a similar patch in the dim and distant past, perhaps
> > we need a comment nearer the lines in question?
> 
> Thank you.  I'll revert the change, and add such comments.

This is done now, in r15910.  But I wonder, why shouldn't we just put
'shopt -s extglob progcomp' at the top of the file, before the '_svn()'?

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r15902 - trunk/tools/client-side

Posted by kf...@collab.net.
Philip Martin <ph...@codematters.co.uk> writes:
> Those are not syntax errors, they are uses of the extended pattern
> matching operator.  Extended pattern matching is a bash feature that
> can be enabled/disabled, if you are getting syntax errors I guess you
> have it disabled.  See the note at the top of the file.  I don't know
> what @$ means, but I'm pretty sure it doesn't work here.
> 
> I seem to recall a similar patch in the dim and distant past, perhaps
> we need a comment nearer the lines in question?

Thank you.  I'll revert the change, and add such comments.

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org