Skip to content

shfmt bug: &> is broken onto a new line, while >& isn't #991

Closed
@tandy-1000

Description

When shfmt sees a &>, it is broken onto a new line:

{ echo "foo" } &>/dev/null || {
    echo "bar"
}

Becomes:

{ echo "foo" } &
	>/dev/null || {
    echo "bar"
}

The transformation also breaks the code.

If you switch &> with >& this does not happen.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions