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
{{ message }}
Repository navigation
cli: Can't escape initial at (@) in parameter #2511
Yes that does seem like a use-case not considered before. I'm not sure the best way to fix that.
My initial thought would be to be able to do: \@at-started-tag and the code could check for content starting with \@ and if so return back the value without the backslash.
@nejch It's in line with $$ in gitlab CICD, docker-compose.yml, and '' in SQL strings. :-)
If you like this, you can just approve my PR. If you prefer backslash tell me, i'll change my PR.
Activity
[-]Can't escape initial at (@) in parameter[/-][+]cli: Can't escape initial at (@) in parameter[/+]JohnVillalovos commentedon Mar 7, 2023
Yes that does seem like a use-case not considered before. I'm not sure the best way to fix that.
My initial thought would be to be able to do:
\@at-started-tagand the code could check for content starting with\@and if so return back the value without the backslash.@nejch Do you have any ideas?
pyhedgehog commentedon Mar 9, 2023
@JohnVillalovos as soon as this is place-specific escape (i.e. it should not be replaced anywhere else except string start) I'd prefer
@@.Fix for python-gitlabGH-2511: Ability to escape at-prefixed parameter
fix(cli): Add ability to escape at-prefixed parameter (python-gitlab#…
fix(cli): Add ability to escape at-prefixed parameter (python-gitlab#…
nejch commentedon Mar 10, 2023
A bit late to the party here sorry folks! :) @JohnVillalovos @pyhedgehog I like the idea with an escape character and
\is more standard. Although@@does look a bit more pleasing visually and is consistent with GitLab's double-escaping dollar signs in variables (https://docs.gitlab.com/ee/ci/variables/#use-the--character-in-cicd-variables). So maybe we could go with that.pyhedgehog commentedon Mar 10, 2023
@nejch It's in line with
$$in gitlab CICD, docker-compose.yml, and''in SQL strings. :-)If you like this, you can just approve my PR. If you prefer backslash tell me, i'll change my PR.
JohnVillalovos commentedon Mar 10, 2023
I'm perfectly fine with
@@fix(cli): add ability to escape at-prefixed parameter (#2513)