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

Trimed values #273

Closed
wants to merge 3 commits into from
Closed

Trimed values #273

wants to merge 3 commits into from

Conversation

Korbeil
Copy link
Contributor

@Korbeil Korbeil commented May 19, 2018

Changing value behavior by not trimming explicit values.

⚠️ Since it's changing behavior for spaces in variables, it should be added only in major version to avoid having unexpected issues.

Related issue

@vlucas
Copy link
Owner

vlucas commented Aug 22, 2018

I actually agree that explicit values in quotes should not be trimmed. I also (strongly) agree about the major version bump being required for this.

What about unquoted values? Should those be trimmed?

@Korbeil
Copy link
Contributor Author

Korbeil commented Aug 23, 2018

Quick tests:

○ → export FOO=bar 
○ → echo "$FOO baz"
bar baz

Only one space here, the space I put after "bar" is trimmed.

○ → export FOO= bar
○ → echo "$FOO baz"
 baz

Space after the = means no variable for linux.

I would say: follow most of linux rules. Trim start & end of the string. And for variables with spaces at the start of the variable, trim theses spaces until we have a # (comment) or a variable.

GrahamCampbell added a commit that referenced this pull request Jan 2, 2019
I've rebased the original PR, and made a couple of fixes during the rebase so that everything really is not trimmed.

---

Closes #273.
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

Successfully merging this pull request may close these issues.

None yet

2 participants