Fix case sensitivity in history-substring-search plugin

- Respect CASE_SENSITIVE setting for case sensitivity
- When CASE_SENSITIVE="true", use case-sensitive search (empty globbing flags)
- When CASE_SENSITIVE not set, preserve current case-insensitive behavior
- Fixes issue #9730
- Maintains backward compatibility
This commit is contained in:
Paul Frederiksen 2025-10-08 11:11:02 -07:00
commit 4211ab8c32

View file

@ -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=''}