Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: expanding parameters like echo/print builtins
- X-seq: zsh-workers 29225
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: PATCH: expanding parameters like echo/print builtins
- Date: Wed, 11 May 2011 17:47:31 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s1024; t=1305128852; bh=85ijdoayHNXJhVAwr6PoZDHVXqeoa1HY+V9gA0M4qOY=; h=X-Yahoo-Newman-Id:Received:X-Yahoo-SMTP:X-YMail-OSG:X-Yahoo-Newman-Property:Received:In-reply-to:From:References:To:Subject:Date:Message-ID; b=HyyDeuCdEGyO2ZBKfDs6W9acbx7Peno0Bcbb9IaocUf5HrmSeIe0+CTP9tL3gA6ZdUvmD5SRhll9NA6WpWopRAuCNEvE7MAJO22s5q7iNL5USTZ9EksIRqI2ynOpDLl64iErDC/n5qlJlLLptS38JMivGsVrzDt3gX+85f7Ssms=
- In-reply-to: <110511080327.ZM23776@torch.brasslantern.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: <1305118971-25617-1-git-send-email-mikachu@gmail.com> <110511080327.ZM23776@torch.brasslantern.com>
Bart wrote:
> I'd probably have done it with ${(%)arr:gs/%/%%} ... but I don't have
> any objection to the (g) flag except to wonder if another choice for
> the letter (g) might be better. The fact that it mnemes to GETKEY_
> isn't going to be very helpful to most users.
Given that % is used for the (%) flag it might be logical to use \ here.
Or would it just be too confusing. It'd probably need quoting, right?
As for existing solutions, ${(Q)${(qqqq)var}//\\\\/\\} might do it.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author