Skip to content

[Bug] Global commands/ directory not recognized on Windows, only command/ works #9335

@ylitchan

Description

@ylitchan

Description
On Windows, custom commands placed in the global config directory ~/.config/opencode/commands/ are not recognized. However, renaming the directory to command/ (singular) makes it work correctly.
Expected Behavior
According to the source code in packages/opencode/src/config/config.ts:
const COMMAND_GLOB = new Bun.Glob("{command,commands}/**/*.md")
Both command/ and commands/ should be valid directory names.
Actual Behavior

  • ~/.config/opencode/commands/commit.md → Not recognized (command not shown in / menu)
  • ~/.config/opencode/command/commit.md → Works correctly
    Environment
  • OS: Windows 11
  • OpenCode Version: 1.1.25
  • Shell: Git Bash / PowerShell
    Possible Cause
    The {command,commands} glob pattern in Bun.Glob may not work correctly on Windows, possibly d

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions