Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tarun-ssharma/4d8619ac11a6a7c2091a57fa0f36c5aa to your computer and use it in GitHub Desktop.
Save tarun-ssharma/4d8619ac11a6a7c2091a57fa0f36c5aa to your computer and use it in GitHub Desktop.
Enable case-insensitive auto-complete whilst giving preference to actual matches

Add these two lines to your ~/.zshrc file:

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

Tested on:

MacOS BigSur Version 11.5.1
MacBook Air (M1, 2020)
@davidchaves
Copy link

Tested on Mac (INTEL, 2012) [Sonoma 14.5]. Thanks.

@anit-k
Copy link

anit-k commented Jul 28, 2024

Tested on MBP (M1, 2021) [Sonoma 14.5]. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment