zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-users@sunsite.dk
Subject: Re: Tab completion breaks after upgrade
Date: Tue, 15 Jun 2004 12:12:16 +0200	[thread overview]
Message-ID: <6586.1087294336@trentino.logica.co.uk> (raw)
In-Reply-To: <200406150926.i5F9Q7c7030048@news01.csr.com>

Peter wrote:
> lists wrote:
> > It was the ~/.zcompdump file.  Thanks so much!
> 
> I think Bart's right and we need to make this version dependent.  The
> only real downside is we probably ought to flag this up to the user so
> they can prune ancient files which aren't going to be used again.  It
> should be an easy change but I'm in the thick of other stuff at the
> moment.

Why not just stick $ZSH_VERSION in the top of .zcompdump along with the
number of files. That avoids having to clear up the ancient files.

Oliver

Index: Completion/compdump
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/compdump,v
retrieving revision 1.6
diff -u -r1.6 compdump
--- Completion/compdump	20 Apr 2004 12:11:15 -0000	1.6
+++ Completion/compdump	15 Jun 2004 10:07:45 -0000
@@ -33,7 +33,7 @@
   (( $#_d_wdirs ))  && _d_files=( "${(@)_d_files:#(${(j:|:)_d_wdirs})/*}" )
 fi
 
-print "#files: $#_d_files" > $_d_file
+print "#files: $#_d_files\tversion: $ZSH_VERSION" > $_d_file
 
 # Dump the arrays _comps, _services and _patcomps.  The quoting
 # hieroglyphics ensure that a single quote inside a variable is itself
Index: Completion/compinit
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/compinit,v
retrieving revision 1.11
diff -u -r1.11 compinit
--- Completion/compinit	20 Apr 2004 12:11:15 -0000	1.11
+++ Completion/compinit	15 Jun 2004 10:07:46 -0000
@@ -442,7 +442,9 @@
 if [[ -f "$_comp_dumpfile" ]]; then
   if [[ -n "$_i_check" ]]; then
     read -rA _i_line < "$_comp_dumpfile"
-    if [[ _i_autodump -eq 1 && $_i_line[2] -eq $#_i_files ]]; then
+    if [[ _i_autodump -eq 1 && $_i_line[2] -eq $#_i_files &&
+        $ZSH_VERSION = $_i_line[4] ]]
+    then
       builtin . "$_comp_dumpfile"
       _i_done=yes
     fi


      reply	other threads:[~2004-06-15 10:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-15  3:18 lists
2004-06-15  4:43 ` Bart Schaefer
2004-06-15  4:55   ` lists
2004-06-15  7:12     ` Wayne Davison
2004-06-15  9:26     ` Peter Stephenson
2004-06-15 10:12       ` Oliver Kiddle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6586.1087294336@trentino.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).