Skip to content

zsh: variable + local + command substitution in array #1327

Description

@tezkerek
% ./shfmt -ln zsh <<<'IFS=":" local change=($(echo abc:def:ghi))'
<standard input>:1:42: the `local` builtin is a bash feature; tried parsing as zsh

Both of these work, on the other hand:

% ./shfmt -ln zsh <<<'local change=($(echo abc:def:ghi))'
local change=($(echo abc:def:ghi))
% ./shfmt -ln zsh <<<'IFS=":" change=($(echo abc:def:ghi))'      
IFS=":" change=($(echo abc:def:ghi))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions