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

Re: svn commit: rev 1791 - trunk/subversion/clients/cmdline trunk/tools/dev

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-04-27 02:06:52 CEST

On Fri, Apr 26, 2002 at 01:50:20PM -0500, Karl Fogel wrote:
> philip@tigris.org writes:
> > * subversion/clients/cmdline/main.c (svn_cl__cmd_table): Add -D/--date to
> > copy, move, merge and switch.
>
> Whoo-hoo! Thanks, Philip.
>
> > * tools/dev/bash_completion: New file.
>
> Whoa. That is so cool. I didn't know that Bash did this...

this is really cool, but i got syntax errors at lines 35 and 143.
apparently bash 2.05a (compiled out of the FreeBSD ports tree) is
having trouble with the following construct:

@($foo)

replacing it with

@{$foo}

seems to silence the syntax errors, and as far as i can tell, appears
to work, but i don't know much about bash scripting, so i'm hesitant
to commit this patch:

Index: ./bash_completion
===================================================================
--- ./bash_completion
+++ ./bash_completion Fri Apr 26 20:02:20 2002
@@ -32,7 +32,7 @@
         # if not typing an option, or if the previous option required a
         # parameter, then fallback on ordinary filename expansion
         if [[ "$cur" != -* ]] || \
- [[ ${COMP_WORDS[COMP_CWORD-1]} == @($optsParam) ]] ; then
+ [[ ${COMP_WORDS[COMP_CWORD-1]} == @{$optsParam} ]] ; then
                 return 0
         fi
 
@@ -140,7 +140,7 @@
                 esac
 
                 # skip next option if this one requires a parameter
- if [[ $opt == @($optsParam) ]] ; then
+ if [[ $opt == @{$optsParam} ]] ; then
                         ((++i))
                 fi
         done

-- 
garrett rooney                    Remember, any design flaw you're 
rooneg@electricjellyfish.net      sufficiently snide about becomes  
http://electricjellyfish.net/     a feature.       -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Apr 27 02:07:58 2002

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.