From 5c541b0e694618cccd48837318339794a8ca0217 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Thu, 16 Feb 2023 10:18:52 +0900 Subject: [PATCH] lib/shopt: Refactor "{ => OMB_}CASE_SENSITIVE" --- lib/shopt.sh | 5 +++-- templates/bashrc.osh-template | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/shopt.sh b/lib/shopt.sh index 9ad9b16..6f677fb 100644 --- a/lib/shopt.sh +++ b/lib/shopt.sh @@ -27,9 +27,10 @@ shopt -s nocaseglob; ## SMARTER TAB-COMPLETION (Readline bindings) ## # Perform file completion in a case insensitive fashion -if [[ ${CASE_SENSITIVE-} == false ]]; then +# Note: CASE_SENSITIVE is the compatibility name +if [[ ${OMB_CASE_SENSITIVE:-${CASE_SENSITIVE:-}} == false ]]; then bind "set completion-ignore-case on" -elif [[ ${CASE_SENSITIVE-} == true ]]; then +elif [[ ${OMB_CASE_SENSITIVE:-${CASE_SENSITIVE:-}} == true ]]; then bind "set completion-ignore-case off" else # By default, case sensitivity is disabled. diff --git a/templates/bashrc.osh-template b/templates/bashrc.osh-template index b1afa8c..82be0d1 100644 --- a/templates/bashrc.osh-template +++ b/templates/bashrc.osh-template @@ -12,7 +12,7 @@ export OSH=~/.oh-my-bash OSH_THEME="font" # Uncomment the following line to use case-sensitive completion. -# CASE_SENSITIVE="true" +# OMB_CASE_SENSITIVE="true" # Uncomment the following line to use hyphen-insensitive completion. Case # sensitive completion must be off. _ and - will be interchangeable.