Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: more splitting
- X-seq: zsh-users 30576
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: more splitting
- Date: Wed, 15 Apr 2026 09:07:31 -0700
- Arc-authentication-results: i=1; mx.google.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ERiBE8NIrXGibPryXyBIIHVJF61IXUBjekt1Lx6qTx0=; fh=hSLUtyVkxbQ84ew/DOQBCr+JU3iz+amDTVKA6VBWyHw=; b=gm6l21xzxzOBFYgQq9FbjoKpfO6J9aR9fweWy8AbqX+1HGLdHLWavsEYxBA37rfCos KGqVpUCQfhfq0fSkbiuw1yRXgCXSLyJtIBsh7j6joQ2qSTol0XnuX2OGvtlGY1eb1Swl zhkc0NEPsfRtBMacV+sTo2CH37Tx0gRZ48ZAGjb9L8j2QdAAeq0qmgxJhEL1mFFbCtbY t/H9o4v14inlMHXNx90cmYLCnPNEqt95ZfSFnIldLWtoVtQBp51iITb4LG9UtKXbQMBV xKNsw/fJzGfMixiW296Nf/JpSLyDrVIJJ6jlQfpEWP2+pUaI+zCpG3O/QlDznkOzyFYJ +lBg==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1776269266; cv=none; d=google.com; s=arc-20240605; b=HPLUGFVDLVSWggBDy5ADX+nFAfREMHC/paNhYMlprc5OZjJ84Tq2ceF0ZIx6VdEEaU E8XvZH/kdgneO2nWoMQWiTVFA2SouKmhSsJ8L4PmHCLBU2HVkw7MEgdknyD4sd7fb+m6 9oIeK/EreIp4zjJnqLPcpReBHHR/+xfkIeLx+qBA2bKcyXW/B2LY3G3uvRXWdwZUJIwy RakG+54AoXNlaT+25SN7P38RQsNQBsasd9r9mh+/t5y1Oujf0MV3mfy/tEKL4LAGVFom MSUx3GIVdBh0IC1z3PpnfXENNmIoN05+oMqeJGI7smQXwBg6xkXlsFUWRd/tZazs0EoU vHbQ==
- Archived-at: <https://zsh.org/users/30576>
- In-reply-to: <0e11e943-3ed3-4e0b-bd35-1f136756ebae@eastlink.ca>
- List-id: <zsh-users.zsh.org>
- References: <711e5b5f-5bd3-44e5-87a7-e18b0d670ae5@eastlink.ca> <CAGdYchuXfLZNBY2r8ztKuBrP17BN9UZ-jy_pOXtTHUesyMCL3Q@mail.gmail.com> <CAH+w=7a1Z3T2+t5w5Y9_ODFwsDycWfejKSTL9aoukEHhqO8RxQ@mail.gmail.com> <19aa1276-5f07-4c9a-8c6f-0c460be587a1@eastlink.ca> <CAH+w=7ZrV8XciLSxg10AoJdYCRDDMj2+oZBbbor_Miiva==4pg@mail.gmail.com> <0e11e943-3ed3-4e0b-bd35-1f136756ebae@eastlink.ca>
On Wed, Apr 15, 2026 at 8:21 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> I hope my comments are correct:
>
> read -d '' -r _hex_var # -d:terminate on nul, -r:'raw'--all literal.
Correct. The effect here is to read the entire input as one string.
> # (q+):quote the quotes ... sorta, -C1: columns split on spaces.
Not exactly. No splitting is done by "print".
When the name passed in refers to an array, ${(P)_hex_var} will also
be an array. So:
# (q+):quote the string, or quote each element if the value is an array
# -C1: print each string or array element in a single column
Even more accurately:
# (q+): apply quotes using the simpler of '...' or $'...' as needed
# -C1: make one column out of all the arguments to "print".
You can also do -C2, etc.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author