aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/_completion_ignore_case.bash
blob: fe8208fc83d3f880739c6ed24e4fa8cf2b82ddbc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# Return whether to ignore case for filename completion
_completion_ignore_case() {

    # Check Readline settings for case-insensitive matching
    while read -r _ set ; do
        [[ $set == 'completion-ignore-case on' ]] || continue
        return 0
    done < <(bind -v)
    
    # Didn't find it, stay case-sensitive
    return 1
}