zsh-workers
 help / color / mirror / code / Atom feed
* PS2 shows "cmdsubst" for process substitution
@ 2024-03-07  6:32 Stephane Chazelas
  2024-03-07  6:53 ` [PATCH][DOC] zsh_eval_context doc improvements (Was: PS2 shows "cmdsubst" for process substitution) Stephane Chazelas
  0 siblings, 1 reply; 2+ messages in thread
From: Stephane Chazelas @ 2024-03-07  6:32 UTC (permalink / raw)
  To: Zsh hackers list

% cat =(
cmdsubst> echo $zsh_eval_context
cmdsubst> )
toplevel equalsubst

% cat <(
cmdsubst> echo $zsh_eval_context
cmdsubst> )
toplevel outsubst

% echo $(
cmdsubst> cat <(
cmdsubst cmdsubst> cat =(
cmdsubst cmdsubst cmdsubst> echo $zsh_eval_context
cmdsubst cmdsubst cmdsubst> )
cmdsubst cmdsubst> )
cmdsubst> )
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)?

-- 
Stephane


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH][DOC] zsh_eval_context doc improvements (Was: PS2 shows "cmdsubst" for process substitution)
  2024-03-07  6:32 PS2 shows "cmdsubst" for process substitution Stephane Chazelas
@ 2024-03-07  6:53 ` Stephane Chazelas
  0 siblings, 0 replies; 2+ messages in thread
From: Stephane Chazelas @ 2024-03-07  6:53 UTC (permalink / raw)
  To: Zsh hackers list

[-- 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-03-07  6:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-07  6:32 PS2 shows "cmdsubst" for process substitution Stephane Chazelas
2024-03-07  6:53 ` [PATCH][DOC] zsh_eval_context doc improvements (Was: PS2 shows "cmdsubst" for process substitution) Stephane Chazelas

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).