Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zle messes up 'words' variable?
- X-seq: zsh-workers 29087
- From: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- To: Jérémie Roquet <arkanosis@xxxxxxxxx>
- Subject: Re: zle messes up 'words' variable?
- Date: Wed, 27 Apr 2011 12:51:55 +0300
- Cc: zsh-workers@xxxxxxx, Jonathan Nieder <jrnieder@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:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=2q4iffal4zph7VvVpodxgqaIA17Pdzb0pCi8NpGOAKI=; b=Jv62fsOyuchmWgaxlr+MGDFRID/raq4yY6pMQgUg6DxTSqxj5vc9fP73sOeR4nxXik IQIyfRYLoi18vvg7u6d/Bxd2bSxehHxTio2XhaX4QPZn702Vv+bYlXqK99OWV3Z6P0Gl VENxgnJkrv6/g1oteFpDi8gfjMqiCFWWnqAB8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=b03qKKOGaUkkcm8HbAhTyBSBzPVNILoc8zuyFtkJtQ+04XJfjQdjUFpEfI8X19jr9Y QG1dzli23/yY2dh5vHUTYEg3nYZysLgImEIgjkNy/f/vdo4np/qjJtOsZPkzs2xrNaeR WJHoDVU4SMsg1xyIQ6fry/TSJnl89oZtjo4IA=
- In-reply-to: <BANLkTikjhFXjFudvDY-DprT-xcK8z=Yy_A@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> <BANLkTik=Jvvp+af1Zg3487VFQ_7HZyRJ_Q@mail.gmail.com> <BANLkTikjhFXjFudvDY-DprT-xcK8z=Yy_A@mail.gmail.com>
2011/4/27 Felipe Contreras <felipe.contreras@xxxxxxxxx>:
> 2011/4/27 Jérémie Roquet <arkanosis@xxxxxxxxx>:
>> 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
Also, Jonathan Nieder found that this works using 'typeset -h', but
that's not supported in bash. It would be nice to tell zsh to use
'typeset -h' whenever it finds 'local', or something like that.
>>> set_vars
>>>
>>> echo "cur=${cur} words=${words} cwords=${cwords}" >> /tmp/comp_test.txt
>>> }
>>>
>>> compdef _foo foo
>>> ---
--
Felipe Contreras
Messages sorted by:
Reverse Date,
Date,
Thread,
Author