Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] swap eval contexts for <(...) and >(...)
- X-seq: zsh-workers 54322
- From: dana <dana@xxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [PATCH] swap eval contexts for <(...) and >(...)
- Date: Thu, 09 Apr 2026 01:02:53 -0500
- Archived-at: <https://zsh.org/workers/54322>
- Feedback-id: i9be146f9:Fastmail
- List-id: <zsh-workers.zsh.org>
the documentation for zsh_eval_context says:
insubst
The <(...) form of process substitution.
outsubst
The >(...) form of process substitution.
but:
% cat <( print -r - $zsh_eval_context )
toplevel outsubst
% : >( print -r - $zsh_eval_context )
toplevel insubst
swapped due to perspective confusion?
assuming so i will include tests with a subsequent patch
dana
diff --git a/Src/exec.c b/Src/exec.c
index 7a928a316..2d2dbf22e 100644
--- a/Src/exec.c
+++ b/Src/exec.c
@@ -5126,7 +5126,7 @@ getproc(char *cmd, char **eptr)
#endif /* PATH_DEV_FD */
cmdpush(CS_CMDSUBST);
- execode(prog, 0, 1, out ? "outsubst" : "insubst");
+ execode(prog, 0, 1, out ? "insubst" : "outsubst");
cmdpop();
zclose(out);
_realexit();
@@ -5175,7 +5175,7 @@ getpipe(char *cmd, int nullexec)
redup(pipes[out], out);
closem(FDT_UNUSED, 0); /* this closes pipes[!out] as well */
cmdpush(CS_CMDSUBST);
- execode(prog, 0, 1, out ? "outsubst" : "insubst");
+ execode(prog, 0, 1, out ? "insubst" : "outsubst");
cmdpop();
_realexit();
return 0;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author