Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different indent when pass environment variables with command substitution #1015

Open
chnkd opened this issue Jun 30, 2023 · 3 comments
Open

Comments

@chnkd
Copy link

chnkd commented Jun 30, 2023

foo=foo \
	echo foo

foo=$() \
	echo foo

foo=foo \
	bar=bar \
	echo foobar

foo=$() \
bar=bar \
	echo foobar
@mvdan
Copy link
Owner

mvdan commented Jul 2, 2023

Sorry but I don't understand. Exactly what did you run and what happened?

@chnkd
Copy link
Author

chnkd commented Jul 3, 2023

Assign a constant to foo, the code will be formatted as below:

foo=foo \
	bar=bar \
	echo foo bar

Replace with command substitution, and the indent style of formatted code is different from the above

foo=$(echo foo) \
bar=bar \
	echo foo bar

@mvdan mvdan removed the needs info label Jul 13, 2023
@mvdan
Copy link
Owner

mvdan commented Jul 13, 2023

Thanks, that does look like a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants