mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
lib/shopt: Add support for CASE_SENSITIVE
Co-authored-by: Koichi Murase <myoga.murase@gmail.com>
This commit is contained in:
+8
-1
@@ -27,7 +27,14 @@ shopt -s nocaseglob;
|
||||
## SMARTER TAB-COMPLETION (Readline bindings) ##
|
||||
|
||||
# Perform file completion in a case insensitive fashion
|
||||
bind "set completion-ignore-case on"
|
||||
if [[ ${CASE_SENSITIVE-} == false ]]; then
|
||||
bind "set completion-ignore-case on"
|
||||
elif [[ ${CASE_SENSITIVE-} == true ]]; then
|
||||
bind "set completion-ignore-case off"
|
||||
else
|
||||
# By default, case sensitivity is disabled.
|
||||
bind "set completion-ignore-case on"
|
||||
fi
|
||||
|
||||
# Treat hyphens and underscores as equivalent
|
||||
bind "set completion-map-case on"
|
||||
|
||||
Reference in New Issue
Block a user