Skip to content

[FEATURE]: /cd command: add to slash command autocomplete list + interactive directory picker #15220

@jjnxpct

Description

@jjnxpct

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Two improvements to the /cd command (added in #7266):

1. /cd is missing from the slash command autocomplete list

When typing / in the prompt, the autocomplete list shows available commands. The /cd command does not appear in this list, even though it works when typed manually. This makes it undiscoverable for users who don't know it exists.

Expected: /cd should appear in the autocomplete list alongside other commands like /undo, /redo, /sessions, etc.

2. Interactive directory picker for /cd

Currently /cd requires manually typing the full path. It would be much more user-friendly to have an interactive directory picker/browser — similar to how /sessions shows a selectable list, or how @ provides fuzzy file search.

This could work as:

  • /cd without arguments opens an interactive folder browser
  • /cd <partial path> provides fuzzy autocomplete suggestions for directories
  • /cd <full path> works as it does today (direct navigation)

Why is this useful?

The /cd command is a great feature for switching between projects without restarting OpenCode. But without autocomplete visibility and with the requirement to type full paths manually, it's hard to discover and cumbersome to use. An interactive picker would make project switching fast and intuitive.

Environment

  • OpenCode version: 1.2.15
  • OS: Windows 11
  • Terminal: Windows Terminal / VS Code integrated terminal

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionUsed for feature requests, proposals, ideas, etc. Open discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions