[BUG] Tab completion broken for ! prefix bash commands
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
- Start Claude Code
- Type
!npm in(partial command) - Press Tab
- Observe: No completion happens
- 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.
19 Comments
Found 1 possible duplicate issue:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
+1 Additionally, it would be good to follow the zsh or bash setup for auto completion
any update?
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.
Still needed.
Still needed.
Still needed.
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.
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 :)
Still needed. It avoids interleaving b/w cc and terminal.
+1
Still needed. Following.
+1
+1
+1 still needed
+1 still needed
+1 still needed
+1 still needed
+1