From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21084 invoked from network); 3 Aug 2006 09:09:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.4 (2006-07-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,HTML_40_50,HTML_MESSAGE,MIME_HTML_ONLY autolearn=ham version=3.1.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 3 Aug 2006 09:09:05 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 96106 invoked from network); 3 Aug 2006 09:08:58 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 3 Aug 2006 09:08:58 -0000 Received: (qmail 16099 invoked by alias); 3 Aug 2006 09:08:46 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10572 Received: (qmail 16088 invoked from network); 3 Aug 2006 09:08:43 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 3 Aug 2006 09:08:43 -0000 Received: (qmail 94707 invoked from network); 3 Aug 2006 09:08:43 -0000 Received: from mk-ironport-3.mail.uk.tiscali.com (212.74.114.23) by a.mx.sunsite.dk with SMTP; 3 Aug 2006 09:08:42 -0000 Received: from 88-108-35-223.dynamic.dsl.as9105.com (HELO mk-smarthost-3.mail.uk.tiscali.com) ([88.108.35.223]) by mk-ironport-3.mail.uk.tiscali.com with ESMTP; 03 Aug 2006 10:08:40 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aa4HANVY0USCe4VPaYEZLA Received: from 88-108-35-223.dynamic.dsl.as9105.com ([88.108.35.223]:32875) by mk-smarthost-3.mail.uk.tiscali.com with esmtp (Exim 4.30) id 1G8ZC4-0008GR-26; Thu, 03 Aug 2006 09:08:40 +0000 Message-ID: <44D1CB6A.6060908@sheffield.ac.uk> Date: Thu, 03 Aug 2006 11:09:46 +0100 From: Nathan Haigh User-Agent: Thunderbird 1.5.0.5 (X11/20060719) MIME-Version: 1.0 CC: Peter Stephenson , zsh-users@sunsite.dk Subject: Re: autocompletion of file url's References: <44D11FDF.5060000@sheffield.ac.uk> <20060802223421.a65ccae4.p.w.stephenson@ntlworld.com> <44D1C210.3020302@sheffield.ac.uk> In-Reply-To: <44D1C210.3020302@sheffield.ac.uk> X-Enigmail-Version: 0.94.0.0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Replying to my own posts! :o)

I have made some progress. I commented out 2 lines at the start of my .zshrc file that were not in the .zshrc file on my works machine. These were:
autoload -U compinit
compinit

The svn completion stuff now seems to work as i'd hoped, as well as a lot of other stuff like autocompletion when using sudo. How had i lived without all this on my works computer! :o)

However, I'm experiencing 1 little hiccup: having the 2 line above uncommented seem to stop a command working which  allow autocompletion to be a little more forgiving with regards to case:
compctl -M '' 'm:{_a-z-}={-A-Z_}'

Does anyone know how to get these working together?

Cheers
Nathan

Nathan Haigh wrote:
eak!

When i said "I have no idea where to start" i really meant it! Therefore i have a few questions...see my comments within your reply.
FYI: i have a debian system with zsh v4.2.5-7 (from a deb package) installed....in the meantime i'll update this to v4.3.2 available via the zsh website.

Cheers
Nathan

Peter Stephenson wrote:
On Wed, 02 Aug 2006 22:57:51 +0100
Nathan Haigh <n.haigh@sheffield.ac.uk> wrote:
  
I've started using subversion a bit recently and it annoys the hell out
of me when you have to specify repositories etc with file urls since
autocompletion doesn't work. e.g.

svn import tmp/myproject file:///path/to/my/svn/repo
    

It looks like the completion function is still not all that
sophisticated, so presumably no subversion user up to now has got to
grips with the nitty gritty.  Here's your chance to become a zsh
completion wizard...
  
This makes it sound like there are zsh functions already in place for subversion, is this correct? If so, where can i find them and how do i set my shell up to use them as i'm pretty sure they are currently not in use on my debian machine.
The despatcher for subversion commands doesn't have an explicit entry
for "import", so it tries to synthesize it from the help text and
doesn't get it right.  This adds an explicit entry.  I'm guessing the
  
I assume you are talking about zsh functions for subversion command autocompletion here? e.g. "svn che<tab>" completes to "svn checkout" - again, i don't think i currently have this working - how do i do this?
first argument will usually be a directory, but that can be changed if
not.  The URL completion for the second argument is standard across the
completion system and should be good enough for your purposes.
  
Do you mean generic URL completion for things like "file:///p<tab>" should already work? If so, it is not in my case - again, how can i get it working?
Say if you come across any more problems; I only use subversion very
occasionally (and the Perforce completion is a good deal more complete
:-)) but it's an important thing to get right.
  
The only problem is that i'm a total newbie to this so i apologies for my ignorance :o)
I've added matching parentheses to the case statement because they
looked nicer.

Index: Completion/Unix/Command/_subversion
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_subversion,v
retrieving revision 1.19
diff -u -r1.19 _subversion
--- Completion/Unix/Command/_subversion	12 Jul 2006 02:40:54 -0000	1.19
+++ Completion/Unix/Command/_subversion	2 Aug 2006 21:33:21 -0000
@@ -34,32 +34,38 @@
         )
 
         case $cmd in;
-          add)
+          (add)
             args+=(
               '*:file:_files -g "*(^e:_svn_controlled:)"'
             )
           ;;
-          commit)
+          (commit)
             args+=(
               '*:file:_files -g "*(e:_svn_status:)"'
             )
           ;;
-          delete)
+          (delete)
             args+=(
               '*:file:_files -g ".svn(/e:_svn_deletedfiles:)"'
             )
           ;;
-          diff)
+          (diff)
             args+=(
 	      '*: : _alternative "files:file:_files -g \*\(e:_svn_status:\)" "urls:URL:_svn_urls"'
 	    )
           ;;
-          help)
+          (help)
             args+=(
               '*::sub command:_svn_commands'
             )
+	  ;;
+	  (import)
+	    args+=(
+		'1:project directory:_files -/'
+		'2:import location: _alternative "files:file:_files" "urls:URL:_svn_urls"'
+	    )
           ;;
-          log)
+          (log)
             args+=(
               '1: : _alternative "files:file:_files -g \*\(e:_svn_controlled:\)" "urls:URL:_svn_urls"'
 	      '*:file:_files -g "*(e:_svn_controlled:)"'
@@ -72,17 +78,17 @@
 	    '*:path or url: _alternative "files:file:_files" "urls:URL:_svn_urls"'
 	    )
 	  ;;
-          resolved)
+          (resolved)
             args+=(
               '*:file:_files -g "*(e:_svn_conflicts:)"'
             )
           ;;
-          revert)
+          (revert)
             args+=(
               '*:file:_files -g "(.svn|*)(/e:_svn_deletedfiles:,e:_svn_status:)"'
             )
           ;;
-          *)
+          (*)
             case $usage in
               *(SRC|DST|TARGET|URL*PATH)*)
                 args+=(