Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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)
@dennohpeter
Copy link

Tested on Macbook Pro (M1, 2021)

@homayounfh
Copy link

tested on MP (M1, 2021) ventura 13.2

@VidipG
Copy link

VidipG commented Sep 29, 2023

Tested on MBP (Intel, 2017), [Ventura 13.6]. Thanks

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