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

Re: The elements of enlightenment



On Tue, Dec 6, 2022 at 9:07 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Dec 6, 2022 at 12:01 PM Roman Perepelitsa
> <roman.perepelitsa@xxxxxxxxx> wrote:
> >
> > Yeah, it's probably non-trivial. Thankfully, it wouldn't require
> > inserting mutex locks in random places because the parent shell will
> > never be executing concurrently with the child.
>
> I generally hate slippery-slope arguments, but ... as soon as we have
> $[...], someone is going to want "coproc" and <(...) threads too.

And `&` for threads obviously. Yeah, any of those are very difficult.

In practice I don't think $[ .. ] would be super useful. One can use
`printf -v` instead of $(printf) and the same applies to pretty much
all instances of invoking a builtin and capturing its stdout: there is
always a way to get the same data without printing it. I know of only
one exception. To the best of my knowledge, the only way to get
keybindings is to invoke bindkey and capture stdout.

Roman.




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