[FEATURE] Tab completion for a file path within backticks
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:
- Type: `
`` - Type:
d, Tab - Fuzzy match completes
docs/ - Type:
wi, Tab - Fuzzy match completes
docs/wip/ - Type:
kickTab - Fuzzy match finds multiple files with
kickin the filename - Select
docs/wip/claude-telemetry-plan-kickoff.md - 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_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗