Skip to content

[BUG] ClaudeCodeAdd fails when adding a file in a directory with a $ #285

Description

@geoff-tw

Bug Description

When trying to add a file in a pathname that has a $ in it (for example, src/routes/$post/index.tsx) in the buffer to Claude Code, it will throw an error. You have to manually bring it in to context with @ and search for the file, where it can then be added without an issue.

To Reproduce

Steps to reproduce the behavior:

  1. Start Claude Code integration.
  2. Create a file that is inside a directory with a $ in it.
  3. Add the file to the buffer.
  4. You will see an error.

Expected Behavior

The file should be added to the buffer like any other.

Environment

  • Neovim version: [e.g. 0.12.3]
  • Claude Code CLI version: [e.g. 2.1.179]
  • OS: [e.g. macOS 26.5.1]
  • Plugin version: [e.g. 0.2.0]

Error Messages

[ClaudeCode] [command] [ERROR] ClaudeCodeAdd: File or directory does not exist: <file>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions