summaryrefslogtreecommitdiff
path: root/plugins/history-substring-search
diff options
context:
space:
mode:
authorPaul Frederiksen <paul@paulfrederiksen.com>2025-10-09 03:52:09 -0700
committerGitHub <noreply@github.com>2025-10-09 12:52:09 +0200
commit853680fd621a8907338e0eee080dc6cf754408bf (patch)
treef61fbd4fdbc2c76bad7883b5000334129c3c1c7d /plugins/history-substring-search
parentc6482fa5be724e9504c6ffe92203440e4c3239b5 (diff)
downloadzsh-853680fd621a8907338e0eee080dc6cf754408bf.tar.gz
zsh-853680fd621a8907338e0eee080dc6cf754408bf.tar.bz2
zsh-853680fd621a8907338e0eee080dc6cf754408bf.zip
fix(history-substring-search): honor `CASE_SENSITIVE` variable (#13360)
Diffstat (limited to 'plugins/history-substring-search')
-rw-r--r--plugins/history-substring-search/history-substring-search.zsh9
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/history-substring-search/history-substring-search.zsh b/plugins/history-substring-search/history-substring-search.zsh
index 9f0e0b0d5..db516f580 100644
--- a/plugins/history-substring-search/history-substring-search.zsh
+++ b/plugins/history-substring-search/history-substring-search.zsh
@@ -45,7 +45,14 @@
: ${HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=magenta,fg=white,bold'}
: ${HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=white,bold'}
-: ${HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'}
+
+# Respect CASE_SENSITIVE setting for case sensitivity
+if [[ "$CASE_SENSITIVE" = true ]]; then
+ : ${HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS=''}
+else
+ : ${HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'}
+fi
+
: ${HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE=''}
: ${HISTORY_SUBSTRING_SEARCH_FUZZY=''}
: ${HISTORY_SUBSTRING_SEARCH_PREFIXED=''}