-
Notifications
You must be signed in to change notification settings - Fork 8
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 interpolating in git cmd string macro #30
Comments
I think this is a bug in Julia? julia> macro foo_cmd(ex)
println(ex)
end
@foo_cmd (macro with 1 method)
julia> a = "123"
"123"
julia> foo`x y z`
x y z
julia> foo`x $a z`
x $a z |
julia> macro foo_str(ex)
println(ex)
end
@foo_str (macro with 1 method)
julia> macro bar_cmd(ex)
println(ex)
end
@bar_cmd (macro with 1 method)
julia> a = "hello"
"hello"
julia> foo"$a"
$a
julia> bar`$a`
$a |
The discussion in JuliaLang/julia#23481 seems to imply that support for interpolation string macros won’t be added to Julia. So we’d have to add the support ourselves in this package. |
Yea, thats what I meant from the start, should have been more clear. |
Nah, the confusion was all on me. Anyway, sounds like a good idea. I don’t really know enough about macros to figure out how to don’t this; maybe someone else can help out. |
I haven't looked at it, but can maybe look at what |
I had to deal with handling interpolation in a non-standard string literal here: https://github.com/invenia/MultilineStrings.jl/blob/3192dbf8872b99cb2a09a46894b22428191805ca/src/MultilineStrings.jl#L120. I think the same approach would probably work here |
I propose to deprecate the cmd string macro in favor of |
Isn't it better to just let people use
? |
That's already available so if we think that's all that's needed the easiest solution is just to remove the cmd macro. |
Exactly. Is there any other advantage with the cmd macro? |
Considering that it currently does a plain The functionality I really want, however, is |
It sounds like the plan here would be:
|
Step 1 is done in #34 |
No description provided.
The text was updated successfully, but these errors were encountered: