Shell commands don't appear to expand in custom commands #1477

Closed
opened 2026-02-16 17:31:10 -05:00 by yindo · 2 comments
Owner

Originally created by @Cluster444 on GitHub (Aug 24, 2025).

I created a test command that only has a git status with supplied $ARGUMENTS, and ran it like this

Using this command/test.md

---
description: "Test shell commands"
---

<test>
`!git status`
</test>

$ARGUMENTS

And using it with this argument

/test Can you describe for me what is in the <test> tag above

It output

<test>
`!git status`
</test>

Can you describe for me what is in the <test> tag above
cluster444 (06:15 PM)
The content in the <test> tag is:

`!git status`

This appears to be a command wrapped in backticks with an exclamation mark prefix. The !git status looks like it could be a shell command reference or a special syntax for running git status - possibly
from a Jupyter notebook, markdown documentation, or another system that uses ! as a prefix to execute shell commands.
Originally created by @Cluster444 on GitHub (Aug 24, 2025). I created a test command that only has a `git status` with supplied $ARGUMENTS, and ran it like this Using this `command/test.md` ``` --- description: "Test shell commands" --- <test> `!git status` </test> $ARGUMENTS ``` And using it with this argument ``` /test Can you describe for me what is in the <test> tag above ``` It output ``` <test> `!git status` </test> Can you describe for me what is in the <test> tag above cluster444 (06:15 PM) ``` ``` The content in the <test> tag is: `!git status` This appears to be a command wrapped in backticks with an exclamation mark prefix. The !git status looks like it could be a shell command reference or a special syntax for running git status - possibly from a Jupyter notebook, markdown documentation, or another system that uses ! as a prefix to execute shell commands. ```
yindo closed this issue 2026-02-16 17:31:10 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Aug 24, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #299: [feat] custom slash commands - This comprehensive issue discusses the exact same functionality you're experiencing, including the ! prefix for bash command execution within custom commands and the `` placeholder
  • #1217: Memories and Shell Cmds - Discusses shell commands with ! prefix functionality from Claude Code and its implementation in opencode

The core issue you're reporting (shell commands with ! prefix not expanding in custom commands) is covered extensively in issue #299, which includes detailed implementation plans for bash command execution support in custom commands.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 24, 2025): This issue might be a duplicate of existing issues. Please check: - #299: [feat] custom slash commands - This comprehensive issue discusses the exact same functionality you're experiencing, including the `!` prefix for bash command execution within custom commands and the `` placeholder - #1217: Memories and Shell Cmds - Discusses shell commands with `!` prefix functionality from Claude Code and its implementation in opencode The core issue you're reporting (shell commands with `!` prefix not expanding in custom commands) is covered extensively in issue #299, which includes detailed implementation plans for bash command execution support in custom commands. Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Aug 25, 2025):

@Cluster444 you need to do it like:

!`git status`

instead of:
`!git status`

@rekram1-node commented on GitHub (Aug 25, 2025): @Cluster444 you need to do it like: !\`git status\` instead of: \`!git status\`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1477