From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29708 invoked by alias); 18 Nov 2017 18:22:15 -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: List-Unsubscribe: X-Seq: 42030 Received: (qmail 24370 invoked by uid 1010); 18 Nov 2017 18:22:14 -0000 X-Qmail-Scanner-Diagnostics: from aok120.rev.netart.pl by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(85.128.245.120):SA:0(-1.9/5.0):. Processed in 8.267269 secs); 18 Nov 2017 18:22:14 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: psprint@zdharma.org X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new using ClamAV (6) Date: Sat, 18 Nov 2017 19:22:03 +0100 From: Sebastian Gniazdowski To: zsh-workers@zsh.org Message-ID: In-Reply-To: References: Subject: Re: Feature request =?utf-8?Q?=E2=80=93=C2=A0substitutions_?=similar to +, -, :+, :- X-Mailer: Airmail (442) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline On 18 Nov 2017 at 19:05:25, Sebastian Gniazdowski (psprint@zdharma.org) wrote: > echo "I'm ${${theme[use-name]:&Patrick}:-a subscriber}, hello." Just realized that with the description of :& I gave, this would work the same, except not only for "1", but any non-empty string: echo "I'm ${${theme[use-name]:+Patrick}:-a subscriber} So it's a matter of getting consensus on details of :& and :^. Sorry that I don't have access to my revelations of how good boolean test would be. I've had them when was writing code, if I get some again I'll send them. -- Sebastian Gniazdowski psprint /at/ zdharma.org