anomalyco / anomalyco/opencode

Configured commands interpret literal dollar sequences in arguments

Open Beginner friendly
#47,411 1 comment 0 reactions 0 assignees View on GitHub

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
  1. Define a custom command with the template Explain $ARGUMENTS..
  2. Invoke it with the literal argument $&.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.