anomalyco / anomalyco/opencode
Configured commands interpret literal dollar sequences in arguments
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
A configured command interprets replacement-dollar sequences in its arguments instead of inserting them literally. For example, $& repeats the $ARGUMENTS placeholder.
Plugins
Built-in configured commands; no external plugins.
OpenCode version
V2 source checkout at 541937d12449e64d078c67e9013f1c288004b83f.
Steps to reproduce
- Define a custom command with the template
Explain $ARGUMENTS.. - Invoke it with the literal argument
$&. - Inspect the prompt produced by
Command.execute.
Expected: Explain $&.. Actual: Explain $ARGUMENTS.. The sequences $$, dollar-backtick and $' are also expanded by JavaScript's replacement-string rules. Ordinary arguments and positional placeholders pass their controls.
Operating System
macOS arm64, Bun 1.4.1.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Command.execute and reproduce the configured-command case with the template Explain $ARGUMENTS. and the literal argument $&. Trace how arguments are substituted, including $$, dollar-backtick, and $'; done means these sequences remain literal while ordinary arguments and positional placeholders retain their existing behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 74/100