Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: New style completion bug when ctrl-C pressed
- X-seq: zsh-workers 14127
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: martin.ebourne@xxxxxxxxxxxx, zsh-workers@xxxxxxxxxx
- Subject: PATCH: Re: New style completion bug when ctrl-C pressed
- Date: Thu, 26 Apr 2001 16:11:53 +0000
- In-reply-to: <OF5BC3F04A.D43CF126-ON80256A3A.00531685@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <OF5BC3F04A.D43CF126-ON80256A3A.00531685@xxxxxxxxxxxxxxx>
On Apr 26, 4:37pm, martin.ebourne@xxxxxxxxxxxx wrote:
}
} There appears to be a bug in the new style completion system whereby if you
} abort the completion with Ctrl-C (as I often do if the machine is not
} readily responding) it doesn't clear up after itself properly.
}
} The cause would appear to be that a shell function is at some point
} temporarily defined to override the builtin compadd - and this gets left
} around.
Try this. (Doesn't seem worthwhile to do the same for _complete_help, but
maybe we should consider it.)
diff -ru zsh-forge/current/Completion/Base/Completer/_approximate zsh-4.0/Completion/Base/Completer/_approximate
--- zsh-forge/current/Completion/Base/Completer/_approximate Mon Apr 2 04:05:44 2001
+++ zsh-4.0/Completion/Base/Completer/_approximate Thu Apr 26 09:03:30 2001
@@ -61,6 +61,7 @@
# fi
builtin compadd "$_correct_expl[@]" "$@"
}
+ trap '[[ -n "$redef" ]] && unfunction compadd' EXIT INT
fi
_comp_correct=1
@@ -92,7 +93,6 @@
[[ "$compstate[list]" != list* ]] &&
compstate[list]="$compstate[list] force"
fi
- [[ -n "$redef" ]] && unfunction compadd
compstate[pattern_match]="$opm"
return 0
@@ -102,7 +102,6 @@
(( _comp_correct++ ))
done
-[[ -n "$redef" ]] && unfunction compadd
compstate[pattern_match]="$opm"
return 1
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author