Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: more splitting
- X-seq: zsh-users 30573
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: more splitting
- Date: Tue, 14 Apr 2026 23:38:04 -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=+f56HJi5080T6G+baz7hxeINWHPrObnohrdzGN4M/Qc=; fh=hSLUtyVkxbQ84ew/DOQBCr+JU3iz+amDTVKA6VBWyHw=; b=dHL20mqoaOScLjChCZBzWKRcFVOFMOVJ5UJCIUFRCjuVcO25YZTDkeNN02GhNC7tv4 KK0whYsgBX3HRxhXZ0ohyP/YTFnpSVfOmkZzyqK3RWutDfVXovjp+E7diUggpdiSvW29 NIT8BNZO5BGigV0j8vRWXlOxZewlyHop5ibPKo5hYL2Bg7J70JN/QxacVnA3IIRFTg1I 9hvMgAjnHTG9kMiF9YlSHSVSkomKLc2lByeEjL0f/eiqicQMpFTta2DSFpNknpM/A76V cG9oe/ZBbjH3oNePMtYdTWnDcL9CBiHgHZZ8e1rRMzsRdbGTm1oVUpdEH/TtdMGZw4Ll Au2A==; darn=zsh.org
- Arc-seal: i=1; a=rsa-sha256; t=1776235097; cv=none; d=google.com; s=arc-20240605; b=iIYMqVWmm8WlqDYky4uzHHJjPla/i89XYCZAGH47Vou5cor45UOUBuuLW5HcEsyJx5 vv+SP90ikFp+j14QISCa3O8esKZySKZ2NmqRQeAHsjPFG4r1dXOe97ctbSsydZ9FJ1uI wNy1ujRVCQG72R+KMInNuUaQlyhtNFXMNR6lcW5cSNMRQvZYNKC/hrOKQUSAiioHYe2D TDdz3N29kR+fLAhbqS/jOhPggTLlgUn7bPUPGdMacA+SuyOJj3YnbIbl5tfDMePSYTGb M/HNfsuLUjSPuxLddNy/MRmjknTsbjWHg1SFMKWuAyqB4lDxkVuGEzkRYFBHmYCpGX6g JyDQ==
- Archived-at: <https://zsh.org/users/30573>
- In-reply-to: <CAH+w=7a1Z3T2+t5w5Y9_ODFwsDycWfejKSTL9aoukEHhqO8RxQ@mail.gmail.com>
- 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>
On Tue, Apr 14, 2026 at 7:02 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> More later about $(<&0) ...
This is a pretty clever bit of code. It's using $(<filename) syntax,
which tells zsh to open the named file directly instead of doing the
usual thing of creating a subshell for $(...). However, there's no
filename! Instead it tricks the parser into acting like there's a
filename by using the <& redirection syntax, which opens a file
descriptor instead of a name. The chosen descriptor is 0 (zero) which
is standard input: <&0 is normally a no-op. Here, though, it turns
standard input into a substitution.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author