Skip to content

Conversation

@lucasrcezimbra
Copy link

What does this PR do?

Closes #9831

Add ability to escape dollar signs in custom command templates using backslash notation ($). This allows users to include literal $1, $ARGUMENTS, etc. in their templates without triggering substitution.

  • Add processEscapes() function in prompt.ts to handle $ -> $ conversion
  • Update hints() to ignore escaped placeholders when detecting arguments
  • Add unit tests for escape processing and hints detection
  • Document the escape syntax in commands.mdx

How did you verify your code works?

New unit tests. Manual tests using bun dev .

Add ability to escape dollar signs in custom command templates using
backslash notation ($). This allows users to include literal $1,
$ARGUMENTS, etc. in their templates without triggering substitution.

- Add processEscapes() function in prompt.ts to handle $ -> $ conversion
- Update hints() to ignore escaped placeholders when detecting arguments
- Add unit tests for escape processing and hints detection
- Document the escape syntax in commands.mdx

Closes anomalyco#9831
@github-actions
Copy link
Contributor

The following comment was made by an LLM, it may be inaccurate:

No duplicate PRs found

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.

[FEATURE]: Support escaping $ in custom commands

1 participant