Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH][DOC] zsh_eval_context doc improvements (Was: PS2 shows "cmdsubst" for process substitution)



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


Messages sorted by: Reverse Date, Date, Thread, Author