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

[PATCH]: tools/client-side/bash_completion

From: David Summers <david_at_summersoft.fay.ar.us>
Date: 2003-06-30 20:57:19 CEST

I decided to add the bash completion to the RedHat RPMS. However, when I
try to source bash_completion on RedHat 9.0 I get:

[david@amd client-side]$ source bash_completion
bash: bash_completion: line 48: syntax error in conditional expression:
unexpected token `('
bash: bash_completion: line 48: syntax error near `@($'
bash: bash_completion: line 48: ` [[ ${COMP_WORDS[COMP_CWORD-1]}
== @($optsParam) ]] ; then'

So I tried the following patch to hopefully fix it. Does this look right?
If so, let me know and I'll go ahead and commit it as soon as someone
reviews and OKs it.

Log:

* tools/client-side/bash_completion: Fix syntax errors in bash_completion
     script.

Index: tools/client-side/bash_completion
===================================================================
--- tools/client-side/bash_completion (revision 6373)
+++ tools/client-side/bash_completion (working copy)
@@ -45,7 +45,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
  
@@ -181,7 +181,7 @@
                esac
  
                # skip next option if this one requires a parameter
- if [[ $opt == @($optsParam) ]] ; then
+ if [[ $opt == @${optsParam} ]] ; then
                        ((++i))
                fi
        done

-- 
David Wayne Summers          "Linux: Because reboots are for hardware upgrades!"
david_at_summersoft.fay.ar.us   PGP Key: http://summersoft.fay.ar.us/~david/pgp.txt
PGP Key fingerprint =  C0 E0 4F 50 DD A9 B6 2B  60 A1 31 7E D2 28 6D A8 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 30 21:14:22 2003

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.