I’m moving my posts from Reddit to Lemmy before delete them.

This post is from 2020-09-03.

  • Gamma@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    There are two massive points no one has mentioned yet.

    • Quoting every expansion isn’t necessary in Zsh. Parameters don’t split or glob by default.
    • $array actually expands to every element in an array.

    Compare this between Bash and Zsh:

    a=('/* hello */' 'world!' '  ')
    printf '"%s" ' $a