Skip to content

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

Closed

Description

@Cluster444

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.

Activity

  1. github-actions commented on Aug 25, 2025

    @github-actions
    Contributor

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

    • [feat] custom slash commands #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
    • Memories and Shell Cmds #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.

  2. rekram1-node commented on Aug 25, 2025

    @rekram1-node
    Collaborator

    @Cluster444 you need to do it like:

    !`git status`

    instead of:
    `!git status`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions