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

Support variable replacement in backtick expressions #788

Closed
ipsingh06 opened this issue Apr 4, 2021 · 1 comment
Closed

Support variable replacement in backtick expressions #788

ipsingh06 opened this issue Apr 4, 2021 · 1 comment

Comments

@ipsingh06
Copy link

First of all, great project! I recently discovered Just and it looks super useful.

I'm looking to derive a variable from another variable like so, but it looks like variable substitution isn't supported inside backticks.

list := "a b c"
derived1 := `for item in {{list}}; do echo -n "$item, "; done`
derived2 := `for item in a b c; do echo -n "$item, "; done`
just --evaluate
derived1                := "{{list}}, "
derived2                := "a, b, c, "
list                    := "a b c"

Please let me know if there's another way to do this. If not, I think it'd be a great addition. Thanks.

@casey
Copy link
Owner

casey commented Apr 4, 2021

Hi Inderpreet, thanks for the kind words! This isn't currently possible, and is tracked in #11. It's a bit tricky to do, which is why it's taken so long to add.

@casey casey closed this as completed Apr 4, 2021
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

No branches or pull requests

2 participants