aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/_completion_ignore_case.bash
blob: b2bc3727ddb9fe672aab80db28c3b35e26a5744d (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
}