Skip to content

shfmt: insert space after Not#1281

Open
kristiandueholm wants to merge 2 commits intomvdan:masterfrom
kristiandueholm:not-spacing
Open

shfmt: insert space after Not#1281
kristiandueholm wants to merge 2 commits intomvdan:masterfrom
kristiandueholm:not-spacing

Conversation

@kristiandueholm
Copy link
Copy Markdown
Contributor

Purpose

Attempts to solve #987 regarding history expansion triggered by missing whitespace after !.

Changes

I simply added a call to the printer's space function when the unary operator is a Not.

Questions

  • Should I add a test of some sort?
  • Should I add a check for compact, and omit the space if true? It "breaks" if the space is omitted, but I really am not sure if compact is considered "dangerous".

Thanks!

Closes #987

@kristiandueholm
Copy link
Copy Markdown
Contributor Author

I should have run tests before pushing. My bad.

@kristiandueholm
Copy link
Copy Markdown
Contributor Author

Really unsure if this is what you were looking for. Running the original tests in interactive shell causes event not found, so I am guessing they had to be changed.

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.

syntax: printer breaks certain arithmetic expressions

1 participant