From 36783ae406818793ac9a81603dc8642dd2cac7dd Mon Sep 17 00:00:00 2001 From: Aaron Johnon Date: Fri, 18 Mar 2022 23:00:20 -0500 Subject: [PATCH] Added option to allow tab completion to correct case mismatch (mostly for MacOS use) --- example_configs/zsh.conf | 1 + setopt | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/example_configs/zsh.conf b/example_configs/zsh.conf index a665308..6cc0a7d 100644 --- a/example_configs/zsh.conf +++ b/example_configs/zsh.conf @@ -8,6 +8,7 @@ HISTORY_NO_DUPS=true #Ignore duplicate back-to-back commands in shell history # Prompt Style PROMPT_STYLE=bsd2 #Valid options: bsd, bsd2, ar5 COMPLETION_STYLE=bash #ZSH "automenu" option toggle - Valid options: bash, zsh (defaults to bash) +CASE_SENSITIVE=true #Allows for tab-completion to auto-correct case sensitivity ('/vol' + becomes '/Volumes') SHOW_NZ_EXIT=true #When true, prints non-zero exit codes into prompt (zero exit codes are not shown) # Example prompts: diff --git a/setopt b/setopt index 8215731..9021fe7 100644 --- a/setopt +++ b/setopt @@ -51,3 +51,8 @@ then setopt noautomenu fi +if [ $CASE_SENSITIVE = false ] +then + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' +fi +