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

Re: [Review Request] Arrays and their usage



Am 31.05.21 um 23:43 schrieb Lawrence Velázquez:
On Mon, May 31, 2021, at 4:04 PM, René Neumann wrote:
Fun fact: I prefer `...`, because I find it more legible, especially in
the x=`cmd y z` form¹.

If you're doing command substitution in a context where you have
to suppress word-splitting yourself, then you're choosing between

     outer_cmd foo "`inner_cmd bar`" baz

and

     outer_cmd foo "$(inner_cmd bar)" baz

Many (including me) would consider "`...`" less legible.


I'm with you on that. As soon as quotes (or ${}) are involved, `...` loses.

But, at least in my code, simple stuff like
   local tmpdir=`mktemp -d`
is the majority of command calls, and there it helps (me) :)

- René




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