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

Re: The elements of enlightenment



On Mon, Dec 5, 2022 at 11:35 AM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> Which is best?  Probably hardly matters, but still, it's good to know.
> printf is heavy, no?  setopt might be lighter?

Any time you use $(...) [with one exception] zsh is going to fork an
additional process.  So the circumstances in which that would be
"lighter" than doing anything entirely inside the current shell are
vanishingly small.

The exception is that $(<file) reads the file without forking.




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