[FEATURE] Tab completion for a file path within backticks

Resolved 💬 4 comments Opened Mar 27, 2026 by joewalp Closed Apr 27, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

When referencing project files in a prompt, I need to type exact paths to disambiguate among similarly-named files (e.g., multiple kickoff or WIP documents). Today this requires either memorizing the path, copy-pasting from a second terminal, or using @ completion which injects the full file contents into context when I only want to name the file.

Backtick-delimited paths are already a natural convention in markdown, GitHub, and Slack. There's no way to tab-complete them in Claude Code's prompt input.

Proposed Solution

When the user types an opening backtick (` `) and presses Tab, Claude Code should offer project-relative filepath completions using the same fuzzy matching as @ references. Selecting a file inserts the completed path and auto-closes the backtick. Selecting a directory appends /` and waits for further input.

Key behaviors:

  • Tab triggers completion only inside an unclosed single backtick (not triple backticks, not outside backticks)
  • Candidates come from the project tree, respecting .gitignore
  • Fuzzy matching consistent with @ file reference completion
  • Pasted tab characters (inside bracketed paste sequences) are inserted literally
  • No file contents are injected — this inserts path text only

This avoids the Tab/thinking-mode conflict (#8399) because Tab's completion behavior is scoped to the backtick context only.

Alternative Solutions

  • @ references: Work for completion but inject full file contents. I can complete with @ and then delete the @ to get a path-only reference, but this is fiddly.
  • Copy-paste from a second terminal: Works but breaks flow.
  • Typing from memory: Error-prone with long or similar paths.

Priority

Moderate - would be helpful multiple times per day

Feature Category

CLI commands and flags

Use Case Example

During one Claude Code session, I direct Claude to write a kickoff prompt into a wip directory. In a later session, I want to reference that file:

  1. Type: ` ``
  2. Type: d, Tab
  3. Fuzzy match completes docs/
  4. Type: wi, Tab
  5. Fuzzy match completes docs/wip/
  6. Type: kick Tab
  7. Fuzzy match finds multiple files with kick in the filename
  8. Select docs/wip/claude-telemetry-plan-kickoff.md
  9. Result: ` docs/wip/claude-telemetry-plan-kickoff.md `

Claude sees the backtick-delimited path and knows exactly which file I mean, without the file contents being injected into context.

Additional Context

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗