aboutsummaryrefslogtreecommitdiff
path: root/bash/bash_completion.d/ud.bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-10-30 10:39:22 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-10-30 10:39:22 +1300
commitee7396c3eaba483ff950579c99d849d4c719ecb5 (patch)
treea20c0b1a1c756e317dca35ae07641192c43df5f6 /bash/bash_completion.d/ud.bash
parentMerge branch 'release/v1.70.0' (diff)
parentBump VERSION (diff)
downloaddotfiles-ee7396c3eaba483ff950579c99d849d4c719ecb5.tar.gz
dotfiles-ee7396c3eaba483ff950579c99d849d4c719ecb5.zip
Merge branch 'release/v1.71.0'v1.71.0
* release/v1.71.0: Bump VERSION Documented the special install-conf target Respect completion-ignore-case in custom functions Use case statement for sudo -v switching
Diffstat (limited to 'bash/bash_completion.d/ud.bash')
-rw-r--r--bash/bash_completion.d/ud.bash14
1 files changed, 14 insertions, 0 deletions
diff --git a/bash/bash_completion.d/ud.bash b/bash/bash_completion.d/ud.bash
index 47171b78..eb038e12 100644
--- a/bash/bash_completion.d/ud.bash
+++ b/bash/bash_completion.d/ud.bash
@@ -13,6 +13,20 @@ _ud() {
# 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 slashes
local -a dirnames
dirnames=("${COMP_WORDS[COMP_CWORD]}"*/)