Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Get exit code of a command run via coproc {cmd}?
- X-seq: zsh-workers 51731
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Get exit code of a command run via coproc {cmd}?
- Date: Tue, 9 May 2023 09:45:32 +0000
- Archived-at: <https://zsh.org/workers/51731>
- List-id: <zsh-workers.zsh.org>
Hi
I'm running a command in coproc:
coproc {ls -1 dir;}
I would like to know if the ls succeeded (could fail if e.g.: no
`dir`).. How to accomplish this task? $jobstates doesn't hold exit
code and is cleared immediately when ls ends with no chance to read
it.
--
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author