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

Feature Request: escape $$ #13

Closed
nicknovitski opened this issue Aug 15, 2018 · 3 comments
Closed

Feature Request: escape $$ #13

nicknovitski opened this issue Aug 15, 2018 · 3 comments

Comments

@nicknovitski
Copy link

Thank you so much for this project, the -no-unset option was exactly what I was looking for, I've immediately replaced our usage of gettext with it.

Now that I'm a user, would it be possible for envsubst to replace all strings $$foo with $foo?

In my case, I have kubernetes templates for nginx configuration, which I template with some values, but which also contain nginx variables like $remote_user and $bytes_sent strings. My current choices are either to not use -no-unset, or (what I actually do) implement my own escaping with sed.

@a8m
Copy link
Owner

a8m commented Aug 16, 2018

Hey @nicknovitski, Thanks for your feedback. I'm glad you find it useful.

I agree that this feature is necessary, but I'm not sure if I prefer \ or $ for escaping. I would like to see what other people think about it.

@tshak
Copy link

tshak commented Sep 4, 2018

I like double dollar ($${escape_me}). This is how terraform templates works as well.

a8m added a commit that referenced this issue Sep 11, 2018
Follow issue #13, I've added an escaping support in the lexing stage.
@a8m
Copy link
Owner

a8m commented Sep 18, 2018

Closing via v1.1.0. Thanks

@a8m a8m closed this as completed Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants