Skip to content

fix(opencode): resolve shell file mentions#28588

Open
Arcadi4 wants to merge 1 commit into
anomalyco:devfrom
Arcadi4:feat/shell-file-mention
Open

fix(opencode): resolve shell file mentions#28588
Arcadi4 wants to merge 1 commit into
anomalyco:devfrom
Arcadi4:feat/shell-file-mention

Conversation

@Arcadi4
Copy link
Copy Markdown

@Arcadi4 Arcadi4 commented May 21, 2026

Issue for this PR

Closes #28583

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Shell mode passed @file mentions as-is, so commands like cat @abc.txt fail. This PR resolves existing file mentions before shell execution to single-quoted absolute paths (like '/absolute/path/to/file.text'). For pwsh, paths are still single-quoted but use PowerShell-compatible escaping for apostrophes.

How did you verify your code works?

  • Ran bun typecheck from packages/opencode.
  • Built locally and manually verified through the artifact, the shell resolves @ file mentions.

Screenshots / recordings

TUI shell mention verification

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added needs:compliance This means the issue will auto-close after 2 hours. and removed needs:compliance This means the issue will auto-close after 2 hours. labels May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@Arcadi4 Arcadi4 force-pushed the feat/shell-file-mention branch from a6bcff7 to 3b5625a Compare May 21, 2026 05:35
@Arcadi4 Arcadi4 force-pushed the feat/shell-file-mention branch from 3b5625a to 78e4340 Compare May 21, 2026 05:45
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.

@file reference not resolved in shell commands

1 participant