zsh-workers
 help / color / mirror / code / Atom feed
From: Stephane Chazelas <stephane@chazelas.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: [PATCH][DOC] zsh_eval_context doc improvements (Was: PS2 shows "cmdsubst" for process substitution)
Date: Thu, 7 Mar 2024 06:53:54 +0000	[thread overview]
Message-ID: <20240307065354.6eq7ptd5w6iwctf2@chazelas.org> (raw)
In-Reply-To: <20240307063256.qvnogt566fm4ooca@chazelas.org>

[-- Attachment #1: Type: text/plain, Size: 692 bytes --]

2024-03-07 06:32:56 +0000, Stephane Chazelas:
[...]
> cmdsubst cmdsubst cmdsubst> echo $zsh_eval_context
> toplevel cmdsubst outsubst equalsubst
> 
> 
> Those "cmdsubst" are a bit misleading. Would it be possible to
> change it to those equalsubst, outsubst, insubst from
> zsh_eval_context (or just procsubst for process substitution for
> all 3)?
[...]

BTW, I've noted a couple of problems in the zsh_eval_context
doc, addressed in the patch attached:

- added the new ${ ... } and ${| ...} to the list where
  $zsh_eval_context has "cmdsubst"
- replaced the "file substitution" wording (not used anywhere
  else) with "process substitution" (from ksh and used
  elsewhere).

-- 
Stephane

[-- Attachment #2: zsh_eval_context-doc.diff --]
[-- Type: text/x-diff, Size: 1301 bytes --]

diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo
index 8c5e67e70..65a337595 100644
--- a/Doc/Zsh/params.yo
+++ b/Doc/Zsh/params.yo
@@ -1030,11 +1030,12 @@ Code specified by the tt(-c) option to the command line that invoked
 the shell.
 )
 item(tt(cmdsubst))(
-Command substitution using the tt(`)var(...)tt(`) or
-tt($+LPAR())var(...)tt(RPAR()) construct.
+Command substitution using the tt(`)var(...)tt(`),
+tt($+LPAR())var(...)tt(RPAR()), tt(${ )var(...)tt( }) or
+tt(${|)var(...)tt(}) construct.
 )
 item(tt(equalsubst))(
-File substitution using the tt(=+LPAR())var(...)tt(RPAR()) construct.
+The tt(=+LPAR())var(...)tt(RPAR()) form of process substitution.
 )
 item(tt(eval))(
 Code executed by the tt(eval) builtin.
@@ -1062,13 +1063,13 @@ item(tt(globsort))(
 Code executed to order files by the tt(o) glob qualifier.
 )
 item(tt(insubst))(
-File substitution using the tt(<LPAR())var(...)tt(RPAR()) construct.
+The tt(<LPAR())var(...)tt(RPAR()) form of process substitution.
 )
 item(tt(loadautofunc))(
 Code read directly from a file to define an autoloaded function.
 )
 item(tt(outsubst))(
-File substitution using the tt(>LPAR())var(...)tt(RPAR()) construct.
+The tt(>LPAR())var(...)tt(RPAR()) form of process substitution.
 )
 item(tt(sched))(
 Code executed by the tt(sched) builtin.

      reply	other threads:[~2024-03-07  6:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07  6:32 PS2 shows "cmdsubst" for process substitution Stephane Chazelas
2024-03-07  6:53 ` Stephane Chazelas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240307065354.6eq7ptd5w6iwctf2@chazelas.org \
    --to=stephane@chazelas.org \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).