[BUG] Tab completion broken for ! prefix bash commands

Open 💬 19 comments Opened Dec 30, 2025 by AbdelrahmanHafez

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Tab completion no longer works when typing bash commands with the ! prefix. When I press Tab while typing a command or path after !, nothing happens. Previously, Tab would complete command names and file paths.

What Should Happen?

Pressing Tab after ! should complete shell commands and file paths, like it did in previous versions.

Steps to Reproduce

  1. Start Claude Code
  2. Type !npm in (partial command)
  3. Press Tab
  4. Observe: No completion happens
  5. Expected: Should complete to !npm install

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Not certain of exact version, but worked before Tab was repurposed from "Toggle Thinking mode" to completing suggested prompts.

Claude Code Version

2.0.76

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

Tab completion for !-prefixed input is contextually distinct from suggested prompt completion. When input starts with !, we're in "bash mode" and Tab should complete shell commands/paths. These two uses don't conflict, so both could work based on context.

View original on GitHub ↗

19 Comments

github-actions[bot] · 6 months ago

Found 1 possible duplicate issue:

  1. https://github.com/anthropics/claude-code/issues/15598

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

unsafe9 · 6 months ago

+1 Additionally, it would be good to follow the zsh or bash setup for auto completion

alanhe421 · 6 months ago

any update?

github-actions[bot] · 5 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

AbdelrahmanHafez · 5 months ago

Still needed.

leighewarner · 4 months ago

Still needed.

ecancino · 4 months ago

Still needed.

self-reality · 4 months ago

Seeing a lot of duplicates of this issue which seem to point at one another in a loop. All of them are closed 🤷‍♂️. While the issue is there.

enterthematric · 4 months ago

Still needed, hope this is the right Issue to comment as there are many duplicates pointing at each other in a loop and closed.
Small things matter :)

XueyanZhang · 3 months ago

Still needed. It avoids interleaving b/w cc and terminal.

corby · 3 months ago

+1

brunoguindani · 3 months ago

Still needed. Following.

finikorg · 2 months ago

+1

jjoepayne · 2 months ago

+1

rgourique-olibra · 1 month ago

+1 still needed

alwinlin23 · 26 days ago

+1 still needed

donnybeelo · 16 days ago

+1 still needed

fenil-tss · 13 days ago

+1 still needed

berwynhoyt · 1 day ago

+1