Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15703
| Path | csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Eric Blake <eblake@redhat.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: Backslash missing in brace expansion |
| Date | Fri, 6 Dec 2019 13:37:10 -0600 |
| Organization | Red Hat, Inc. |
| Lines | 23 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.430.1575661041.1979.bug-bash@gnu.org> (permalink) |
| References | <20191206055304.076d6115afa3a4f2a6a21c34@schrader-schulte.de> <20191205201157.cd481936f76d95bbdfabc73c@schrader-schulte.de> <662e2328-f331-c554-afcf-fd3819f6beab@case.edu> <3405.1575652983@jinx.noi.kre.to> <705b3ac8-9918-35bb-5fb6-5b8163907923@case.edu> <1144f1e4-e5ca-71e9-583c-fe2da919378c@redhat.com> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1575661041 28490 209.51.188.17 (6 Dec 2019 19:37:21 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | bug-bash@gnu.org |
| To | chet.ramey@case.edu, Robert Elz <kre@munnari.OZ.AU>, Martin Schulte <gnu@schrader-schulte.de> |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1575661034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OMIR9MK6kTcC5oCGNMcuqRSHxQCcgEPL60MwPpXEdaA=; b=eJeRpBNZWZWUyb6FHzMNJCu5TaSs9CtAFGewSqbvimwNpIXATnFJLYrOxomM7g0U4GmRwn P31kCaaa+Ox8oBfoqpelWxBZowuEs5PpJ4fu8q8cHS3aISzgC/qtGVfGhd+3+evwsJDeOz c6Ha8u0Y5mWH7YsoJwn2NrDF2ChORCQ= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 |
| In-Reply-To | <705b3ac8-9918-35bb-5fb6-5b8163907923@case.edu> |
| Content-Language | en-US |
| X-Scanned-By | MIMEDefang 2.84 on 10.5.11.22 |
| X-MC-Unique | 6z0qJa2eNh65gnufLfP8Fg-1 |
| X-Mimecast-Spam-Score | 0 |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] |
| X-Received-From | 205.139.110.120 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <1144f1e4-e5ca-71e9-583c-fe2da919378c@redhat.com> |
| X-Mailman-Original-References | <20191206055304.076d6115afa3a4f2a6a21c34@schrader-schulte.de> <20191205201157.cd481936f76d95bbdfabc73c@schrader-schulte.de> <662e2328-f331-c554-afcf-fd3819f6beab@case.edu> <3405.1575652983@jinx.noi.kre.to> <705b3ac8-9918-35bb-5fb6-5b8163907923@case.edu> |
| Xref | csiph.com gnu.bash.bug:15703 |
Show key headers only | View raw
On 12/6/19 11:27 AM, Chet Ramey wrote:
> On 12/6/19 9:23 AM, Robert Elz wrote:
>
>> I'm not sure I accept the explanation for the \ missing though, quoting is
>> also a parser activity (though some of it also happens in pattern matching).
>> But normally, backslashes (or any other form of quoting) that result from
>> expansions are simply characters. Quote removal is only supposed to remove
>> quotes that were present on the original command line.
>
> Quote removal is a word expansion, and removes quotes that were present in
> the original word passed to word expansion. Brace expansion is performed
> before any of the POSIX word expansions, and is logically a separate step.
Then that argues that {Z..a} should produce \\ and \', rather than bare
characters, so that the subsequent quote removal gets back to the
intended character.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Backslash missing in brace expansion Eric Blake <eblake@redhat.com> - 2019-12-06 13:37 -0600
csiph-web