Skip to content

Conversation

AndrewDDavis
Copy link

The syntax for snippet placeholders is identical to some shell parameter expansions of the positional arguments in a script. If you want to put such shell expansions in a snippet, the snippet is mangled when it's inserted.

This PR fixes the problem by allowing shell snippets to have a syntax like ${\1:?message}, which doesn't match the pattern from snippet placeholders. After the code for identifying snippet placeholders is run, this call to gsub strips the backslash from the parameter expansion to produce the code that was actually intended.

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

Successfully merging this pull request may close these issues.

1 participant