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

Variable expansion in strings #1012

Closed
michalfita opened this issue Oct 30, 2021 · 1 comment
Closed

Variable expansion in strings #1012

michalfita opened this issue Oct 30, 2021 · 1 comment

Comments

@michalfita
Copy link

At the moment to use content of one variable in string assigned to another variable I have to:

VARIABLE := "content"
SINGLE := 'single ' + VARIABLE
MULTI := """
    multi """ + VARIABLE + """
"""

@default:
    echo SINGLE {{SINGLE}}
    echo MULTI {{MULTI}}

what is more complex cases is very hard to read and non-trivial to write.

The output is:

$ just
SINGLE single content
MULTI multi content

I'd like to achieve the same with:

VARIABLE := "content"
SINGLE := "single {{VARIABLE}}"
MULTI := """
    multi {{VARIABLE}}
"""

@default:
    echo SINGLE {{SINGLE}}
    echo MULTI {{MULTI}}

but at the moment the output is:

just
SINGLE single {{VARIABLE}}
MULTI multi {{VARIABLE}}

Is this fixable?

@casey
Copy link
Owner

casey commented Oct 30, 2021

This has been a longstanding feature request, but hasn't been implemented yet. See #11 for the issue, and #822 for the PR.

@casey casey closed this as completed Oct 30, 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