Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ghanwani

macrumors 603
Original poster
Dec 8, 2008
5,070
6,589
In bash, I had created ~/.inputrc with the following line in it:

set completion-ignore-case on

This allows me to type "cd de <tab>" in my home directory and have it complete to "cd Desktop".

Doing this with zsh doesn't work. Any idea how to get it working? I've seen many different suggestions via google search but none of them has worked so far.
 
Finally found one that worked. Not sure if it's the best. Put this in my .zshrc.

# Allow for autocomplete to be case insensitive
zstyle ':completion:*' matcher-list '' \
'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' \
'+l:|?=** r:|?=**'

# Initialize the autocompletion
autoload -Uz compinit && compinit -i
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.