> ## Content Index
> Fetch the complete content index at: https://sanghunkang.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Fixing zsh Tab Completion Case Sensitivity Over SSH on macOS
- URL: https://sanghunkang.com/fixing-zsh-tab-completion-case-sensitivity-over-ssh-en/
- Published: 2026-04-02T08:18:25.000Z
- Updated: 2026-04-02T08:18:25.000Z
- Author: Sanghun Kang
- Tags: dev, #en, #multi, mac, zsh

On my MacBook, pressing `cd d` \+ Tab shows folders starting with both `d` and `D`. Case-insensitive, as expected.

But when I SSH into my Mac mini, `cd d` \+ Tab only shows folders starting with lowercase `d`. Both machines use APFS (case-insensitive), yet tab completion behaves differently.

## Cause

macOS's zsh does not automatically load the completion system (`compinit`) by default.

On the MacBook, Oh My Zsh (or a similar framework) had already initialized compinit with case-insensitive matching. The Mac mini was running a minimal zsh config, so the completion system was never initialized at all.

Without the completion system loaded, `zstyle` settings have no effect.

## Fix

Add these two lines to `~/.zshrc`:

```bash
autoload -Uz compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'

```

- `autoload -Uz compinit && compinit`: initializes the zsh completion system
- `zstyle ... matcher-list ...`: makes tab completion case-insensitive

Run `source ~/.zshrc` or open a new shell to apply.

## Notes

- `compinit` enables the entire advanced completion system in zsh. It's a prerequisite for all completion customization, not just case sensitivity.
- For bash, add `set completion-ignore-case on` to `~/.inputrc` for the same effect.