From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14670 invoked by alias); 27 Apr 2011 15:06:14 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29093 Received: (qmail 24168 invoked from network); 27 Apr 2011 15:06:12 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110427080606.ZM9595@torch.brasslantern.com> Date: Wed, 27 Apr 2011 08:06:06 -0700 In-reply-to: Comments: In reply to Felipe Contreras "zle messes up 'words' variable?" (Apr 27, 11:26am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: zle messes up 'words' variable? MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Apr 27, 11:26am, Felipe Contreras wrote: } } Strangely enough, if I use the #compdef tag, the code works fine } (words="foo"). } } Any ideas? Hrm. #compdef is equivalent to "compdef -na ..." and causes the function to be autoloaded at the time it's referenced. I don't know of any other reason the -na options would change the behavior. Does the code work fine on repeated attempts or only the first time? What may be happening is that "sticky emulation" is in effect, so that when the function is autoloaded in bash compatibility mode, "words" becomes non-special. If so, I'm not familiar enough with bashcompinit to say whether that's intentional or an accidental side-effect.