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

How do I escape "$" signs when templating happens? #142

Open
dakusui opened this issue Jul 16, 2020 · 2 comments
Open

How do I escape "$" signs when templating happens? #142

dakusui opened this issue Jul 16, 2020 · 2 comments
Assignees
Labels
question Further information is requested

Comments

@dakusui
Copy link
Owner

dakusui commented Jul 16, 2020

I have a following key-value.

{
  "hello": "HELLO",
  "world": "WORLD",
  "value": "eval: $(ref .hello) $(echo $(ref .world))"
}

The intention is to render following element.

 "value": "HELLO $(echo WORLD)"

However, jq-front renders this into :

 "value": "HELLO WORLD"

Because it just considers the given data as a nested command substitution.
How can I define the element to get the desired string?

@dakusui dakusui self-assigned this Jul 16, 2020
@dakusui
Copy link
Owner Author

dakusui commented Jul 16, 2020

Following JSON file results in the desired output.

{
  "hello": "HELLO",
  "world": "WORLD",
  "value": "eval: $(ref .hello) '$(echo '$(ref .world)')'"
}

@dakusui
Copy link
Owner Author

dakusui commented Jul 16, 2020

Please see also Issue #132

dakusui pushed a commit that referenced this issue Jul 16, 2020
dakusui added a commit that referenced this issue Jul 16, 2020
@dakusui dakusui added the question Further information is requested label Jul 16, 2020
dakusui pushed a commit that referenced this issue Jul 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant