diff options
Diffstat (limited to 'bash/bash_completion.d/td.bash')
-rw-r--r-- | bash/bash_completion.d/td.bash | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/bash/bash_completion.d/td.bash b/bash/bash_completion.d/td.bash index db232dd6..f04a7984 100644 --- a/bash/bash_completion.d/td.bash +++ b/bash/bash_completion.d/td.bash @@ -9,6 +9,21 @@ _td() { done < <( shopt -s extglob nullglob shopt -u dotglob + + # 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) + declare -a fns fns=("$dir"/"${COMP_WORDS[COMP_CWORD]}"*) fns=("${fns[@]#"$dir"/}") |