aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/path.bash
diff options
context:
space:
mode:
Diffstat (limited to 'bash/bash_completion.d/path.bash')
-rw-r--r--bash/bash_completion.d/path.bash14
1 files changed, 14 insertions, 0 deletions
diff --git a/bash/bash_completion.d/path.bash b/bash/bash_completion.d/path.bash
index ba2dcb79..21180b1a 100644
--- a/bash/bash_completion.d/path.bash
+++ b/bash/bash_completion.d/path.bash
@@ -26,6 +26,20 @@ _path() {
# Set options to glob correctly
shopt -s dotglob nullglob
+ # Make globbing case-insensitive if appropriate; is there a cleaner way
+ # to find this value?
+ while read -r _ option value ; do
+ case $option in
+ completion-ignore-case)
+ case $value in
+ on)
+ shopt -s nocaseglob
+ break
+ ;;
+ esac
+ esac
+ done < <(bind -v)
+
# Collect directory names, strip trailing slash
local -a dirnames
dirnames=("${COMP_WORDS[COMP_CWORD]}"*/)