Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: quote parameter expansion from GLOB_SUBST
- X-seq: zsh-workers 35139
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: quote parameter expansion from GLOB_SUBST
- Date: Thu, 14 May 2015 23:50:32 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1431640234; bh=8vXecymNRGbY+lbpgIAPL7Dfy5ycHkrujNaZ9RVqlWU=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=T1B9YfF1m7WnCVXGOPR/CIjm7KrzEDOklAMdZVe1H98v0RF9mnBoLOy32+rCQ5qf6pCuOLqlUdeW111+hlAUSLqgTMBWbxsgZchNsZ65oxBqQb6mF97HcJCf1QyLFO2UVKMjma6g3uDnDZzOIE9uo4BfXG5GEUKKMMuCqAP+cw1pKvmg0llkQbG1rl4PSLnKaKPHi53r2ji8yYl6ljZJ//k4g33k60u5QD1OE7xEYKVXrEuFYhPYNWY558qZY2nNxxAyW+9HDaZRGDjefgFwJDWsxXl8UpgHFm+tTLT96odYlW4YFOf4SjeqfURwLbmCvKL751NlllA4oYEJ6u0qkg==
- In-reply-to: <20150510004444.0f7d5444@ntlworld.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: <20150510004444.0f7d5444@ntlworld.com>
On 10 May, Peter wrote:
> the (b) parameter flag to backslash-quote against pattern characters
Playing with this, I managed to get a BUG message:
% a='*'
% echo ${(bqq)a}
utils.c:5104: BUG: bad quote type in quotestring
'*'
We've got (q-) for minimal quoting. If - is a sort of parameter to q,
perhaps we should continue that: (q*) might be more memorable. And
combining (b) with (q) is a bit odd anyway.
Also the completion function should be kept up-to-date.
Oliver
diff --git a/Completion/Zsh/Context/_brace_parameter b/Completion/Zsh/Context/_brace_parameter
index fcca4bf..3955cb7 100644
--- a/Completion/Zsh/Context/_brace_parameter
+++ b/Completion/Zsh/Context/_brace_parameter
@@ -143,6 +143,7 @@ if [[ $PREFIX = *'${('[^\)]# ]]; then
"@:double-quoted splitting of scalars"
"A:create array parameter"
"a:sort in array index order (with O to reverse)"
+ "b:backslash quote pattern characters only"
"c:count characters in an array (with \${(c)#...})"
"C:capitalize words"
"D:perform directory name abbreviation"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author