Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Tab completion breaks after upgrade
- X-seq: zsh-users 7553
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Tab completion breaks after upgrade
- Date: Tue, 15 Jun 2004 12:12:16 +0200
- In-reply-to: <200406150926.i5F9Q7c7030048@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <200406150926.i5F9Q7c7030048@xxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author