quick guide to improve and make faster your Claude Code file suggestion
from https://x.com/thayto_dev/status/2009401734213554494?s=43
before all you have to install ripgrep, jq, fzf
Add this to your ~/.claude/settings.json
"fileSuggestion": {
"type": "command",
"command": "~/.claude/file-suggestion.sh"
},create this file ~/.claude/file-suggestion.sh then add this:
#!/bin/bash
# Custom file suggestion script for Claude Code
# Uses rg + fzf for fuzzy matching and symlink support
# Parse JSON input to get query
QUERY=$(jq -r '.query // ""')
# Use project dir from env, fallback to pwd
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-.}"
# cd into project dir so rg outputs relative paths
cd "$PROJECT_DIR" || exit 1
{
# Main search - respects .gitignore, includes hidden files, follows symlinks
rg --files --follow --hidden . 2>/dev/null
# Additional paths - include even if gitignored (uncomment and customize)
# [ -e .notes ] && rg --files --follow --hidden --no-ignore-vcs .notes 2>/dev/null
} | sort -u | fzf --filter "$QUERY" | head -15then in your terminal:
chmod +x ~/.claude/file-suggestion.sh