Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle messes up 'words' variable?
- X-seq: zsh-workers 29084
- From: Jérémie Roquet <arkanosis@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: zle messes up 'words' variable?
- Date: Wed, 27 Apr 2011 11:02:54 +0200
- Cc: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=5hpMUxzESWfJS23uA8Z0EToac3yRnKOMbL61q97WKM0=; b=fdPakKNZc6G8HNqdqzPSl59EzUAlgCzI72LoGKSY6ez31AWwKyFnRYLevnYiwX9lz1 e9+2jnAX3LgyUFsBTdDv9EuGv1+APhGPFxSorsFrXHzcGFDGrmgaiSUaJh7w2rvj5w3t lnhNr8JnVDZYg1KFqthheLJDkeBQ8ShPhJ38U=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=e+CpkIaeFlMe+WQLgwRIIVzaCrb/4+ZctQsCbFudoB4dcPXpa6iKCyh9iV5QnyuEGh 6YBm+oVI6O3weidVCrPZpaFnavpAYdlG9eD9Y3s3zMkMYvXjpH2Kn9OxKhDjoypfr+4v lmub/La+IAeDJXwPm5cjNO5jSClXMYyQRkyV4=
- In-reply-to: <BANLkTik3BGrNd389-cDELWwdqR_LZ-qgOA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <BANLkTik3BGrNd389-cDELWwdqR_LZ-qgOA@mail.gmail.com>
Hi,
2011/4/27 Felipe Contreras <felipe.contreras@xxxxxxxxx>:
> I'm trying the following:
> ---
> set_vars ()
> {
> cur="foo"
> words="foo"
> cwords="foo"
> }
>
> _foo ()
> {
> local cur words cwords
> set_vars
>
> echo "cur=${cur} words=${words} cwords=${cwords}" >> /tmp/comp_test.txt
> }
>
> compdef _foo foo
> ---
>
> Which results in:
> cur=foo words= cwords=foo
>
> Strangely enough, if I use the #compdef tag, the code works fine (words="foo").
>
> Any ideas?
$words is a special array used for completion. See `man zshcompsys'
for more about it.
Best regards,
--
Jérémie
Messages sorted by:
Reverse Date,
Date,
Thread,
Author