Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $+var and (P) flag
- X-seq: zsh-workers 44385
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: $+var and (P) flag
- Date: Fri, 31 May 2019 13:00:20 +0200
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=3S1YuADwkMGiO69gAQgcsbPWHcMMHPO2XQ4vyP/0oM0=; b=EmpE+9+tYC3O88oKJ2ZeNfgwuhTQbiFzRpvzqdQGpniCCgUsS2+U/2nF5/4JP8KZzX /jXvWFpJkRcogELdc5D8N6xZcQGV+Sn9VInyE5IHTsqWiW1kyo82+dxVXrfuesQOa3nj nGJU5oKQs1cdjkxMVeia4f4zbk6VY9zkAvuvsLOZmebzDI1eiqQh42YPpbK/xLhZspqT vvOtlD0B39ZOJkbQpE8wEWRyiO4JAK/GmzeFbDVt8ZuK9EaVmYogE6xL63lnJcRUcoV9 pSMY6NOvR6n/u8SrCUPANhjCV/Ub/hiYJJJWUmzg3D0Pt2DGI3AS5OS4El4sLgeJvM8F +v3g==
- In-reply-to: <CAN=4vMp3mgYE766yDKq4G=n0wj0zKdZ-5iV3_W0NuRo2CC-_sA@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>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVDp3rKdjrzXeHxiqC15TBSfbgG-rc-t6_p1=3FPyf28Wg@mail.gmail.com> <CAN=4vMp3mgYE766yDKq4G=n0wj0zKdZ-5iV3_W0NuRo2CC-_sA@mail.gmail.com>
Thanks!
pon., 27 maj 2019, 21:52 użytkownik Roman Perepelitsa <
roman.perepelitsa@xxxxxxxxx> napisał:
> You can try [[ -v ${varname:1} ]] and (( $+parameters[${varname:1}] )).
>
> ${varname:1} removes the leading plus. If you can change your code so that
> the plus isn't added, it gets simpler.
>
> Roman.
>
> On Mon, May 27, 2019 at 9:46 PM Sebastian Gniazdowski <
> sgniazdowski@xxxxxxxxx> wrote:
>
>> Hello,
>> simple test:
>>
>> a=1
>> varname='+a'
>> echo ${(P)varname}
>>
>> yields empty output. Is there any way to use the $+var syntax with (P)
>> flag?
>>
>> --
>> Sebastian Gniazdowski
>> News: https://twitter.com/ZdharmaI
>> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
>> Blog: http://zdharma.org
>>
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author