You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A:external-commandsIssues related to external commandsA:quoting-expansionIssues related to string quoting, interpolation, and expansion of variable or glob patterns
I think the idea was to only strip it for flags, which I can understand somewhat, but I don't think stripping all quotes for any arg was the intention.
I think the idea was to only strip it for flags, which I can understand somewhat, but I don't think stripping all quotes for any arg was the intention.
Ya, you're probably right. Your issue just made me think of where we remove quotes and that was the only one I remember.
It does work (although the correct incantation is $""($dump_command)""), but I'm not gonna lie, I hope this is not the final solution for this problem, because this feels pretty insane.
Theoretically I would have to do $""arg"" with every parameter, just to make sure it doesn't get mangled.
I will probably never complain about having to put quotes around variable uses in other shells anymore…
A:external-commandsIssues related to external commandsA:quoting-expansionIssues related to string quoting, interpolation, and expansion of variable or glob patterns
Activity
fdncred commentedon Aug 24, 2022
I thought there was a PR a few weeks ago that stripped quotes like this on purpose?
I think this is the one I'm thinking about #5846
panicbit commentedon Aug 24, 2022
I think the idea was to only strip it for flags, which I can understand somewhat, but I don't think stripping all quotes for any arg was the intention.
panicbit commentedon Aug 24, 2022
Maybe it's important to note that this issue affects a real life use case (in fact, one of my scripts at work broke due to the change):
fdncred commentedon Aug 24, 2022
Ya, you're probably right. Your issue just made me think of where we remove quotes and that was the only one I remember.
fdncred commentedon Aug 24, 2022
I'm not sure what changed to break your script. Feel free to look at PRs. Maybe it was a mistake or a bug.
I've started using parameters like this because it seems to work better.
panicbit commentedon Aug 24, 2022
In what ways does that work better? For the issue at hand at least it does not seem to matter:
fdncred commentedon Aug 24, 2022
i guess i don't have anything that i call with parameters like this
WindSoilder commentedon Aug 26, 2022
@panicbit Would you please verify if the latest main works for you with the following example?
panicbit commentedon Aug 26, 2022
It does work (although the correct incantation is
$""($dump_command)""), but I'm not gonna lie, I hope this is not the final solution for this problem, because this feels pretty insane.Theoretically I would have to do
$""arg""with every parameter, just to make sure it doesn't get mangled.I will probably never complain about having to put quotes around variable uses in other shells anymore…
WindSoilder commentedon Aug 26, 2022
Yeah I agreed.
Sorry for the current situation. I think it's better to use just
$dump_commandWindSoilder commentedon Aug 27, 2022
@panicbit Hi, sorry for disturb, would you please check the latest main again?
I think
$dump_commandcan be used directly for nowpanicbit commentedon Aug 27, 2022
It works 🥳. Thanks for caring about this and putting in all the effort! 😃
Rewrite run_external.rs (#12921)