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

fix quoted here heredocs #626

Merged
merged 1 commit into from
Mar 16, 2025
Merged

fix quoted here heredocs #626

merged 1 commit into from
Mar 16, 2025

Conversation

rob4226
Copy link
Contributor

@rob4226 rob4226 commented Mar 16, 2025

Hello,

First off, thank you for creating and maintaining Bashly. I found it recently and it is an incredibly well-designed tool that has made writing and managing Bash scripts so much easier and more structured. I really appreciate the effort and dedication you’ve put into this project. Keep up the fantastic work!

This PR adds handling for quoted heredocs. Right now, Bashly doesn't recognize quoted heredocs so the generated script fails with syntax errors when executed.

When the heredoc delimiter is single-quoted or double-quoted, lines in the here-document are not expanded (parameter expansion, command substitution, etc... are ignored). Here is a link to the related section in the Bash manual. Also, this article may help explain a bit further.

Link related: #496

@DannyBen
Copy link
Owner

Thank you for your kind words, and for taking the time to write this PR and its specs.
My first impression is that it looks good, but we will take a deeper look at it hopefully today.

@DannyBen
Copy link
Owner

Alright, this is simple and good, thank you.

What I don't like - but it is my fault - is that IndentationHelper specs are embedded within the array specs.
I will merge and move them.

@DannyBen DannyBen merged commit 4b26464 into DannyBen:master Mar 16, 2025
9 checks passed
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.

2 participants