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

Re: [PATCH] bash_completion: improvement, fixes and tests [was: Re: subversion and programmable completion]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-07-25 19:33:31 CEST

Philip Martin wrote:
> Julian Foad <julianfoad@btopenworld.com> writes:
>
>>I see that you followed up in revision 6562 with some changes so
>>that no tests would fail. In doing that, did you intentionally
>>remove the tests for completing "svn --he" etc.?
>
> It was intentional. There are lots of valid svn commands for which
> bash_completion will not work, e.g. 'svn --verbose status'. I didn't
> see why 'svn --help' needed to be supported, particularly as the
> completion for 'svn' no longer suggests '--help'.
>
>>I liked that particular completion, and it was valid.
>
> If you can make it work I will reinstate it.

Patch attached. Log message:
[[[
Reinstate completion of "svn -h" and "svn --help".

* tools/client-side/bash_completion
  (_svn) Return "-h" and "--help" as extra completions for first argument.

* tools/client-side/bash_completion_test
  Reinstate the corresponding tests.
]]]

> At the moment
> bash_completion doesn't suggest every possible command, but I think
> all the suggestions it offers are valid. I'd like to keep it that way.

I agree with you there.

- Julian

Index: tools/client-side/bash_completion_test
===================================================================
--- tools/client-side/bash_completion_test (revision 6580)
+++ tools/client-side/bash_completion_test (working copy)
@@ -100,6 +100,8 @@
 includes "" "?"
 includes "" "h"
 includes "" "help"
+includes "" "-h"
+includes "" "--help"
 includes "" "--version"
 
 echo "Checking list of subcommands"
Index: tools/client-side/bash_completion
===================================================================
--- tools/client-side/bash_completion (revision 6580)
+++ tools/client-side/bash_completion (working copy)
@@ -22,7 +22,7 @@
               stat st switch sw update up --version'
 
         if [[ $COMP_CWORD -eq 1 ]] ; then
- COMPREPLY=( $( compgen -W "$cmds" -- $cur ) )
+ COMPREPLY=( $( compgen -W "$cmds --help -h" -- $cur ) )
                 return 0
         fi
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jul 25 19:26:18 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.