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

Strings defined by multiple successive lines may be erroneously filled with spaces #53

Open
jschleus opened this issue Jul 30, 2019 · 0 comments

Comments

@jschleus
Copy link

Sometimes I define in bash scripts a variable using multiple successive lines to get one or more newlines in the according string. For e.g. the script

#!/bin/sh
T=""
if [ "$T" = "" ]; then
T="Line1
Line2"
fi
echo "$T"

would output

Line1
Line2

But after running beautysh about that script one get the code

#!/bin/sh
T=""
if [ "$T" = "" ]; then
    T="Line1
    Line2"
fi
echo "$T"

and the according output is now erroneously

Line1
    Line2

So such continuation lines should probably not be indented.

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

1 participant