From e521cec24eb88b70cb15b5244e86a5d76032de99 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 1 Dec 2018 02:13:23 +1300 Subject: Use simpler method of no case completion check --- bash/bash_completion.d/eds.bash | 17 ++++++----------- bash/bash_completion.d/man.bash | 17 ++++++----------- bash/bash_completion.d/mysql.bash | 17 ++++++----------- bash/bash_completion.d/pass.bash | 17 ++++++----------- bash/bash_completion.d/path.bash | 17 ++++++----------- bash/bash_completion.d/sd.bash | 17 ++++++----------- bash/bash_completion.d/ud.bash | 17 ++++++----------- 7 files changed, 42 insertions(+), 77 deletions(-) diff --git a/bash/bash_completion.d/eds.bash b/bash/bash_completion.d/eds.bash index ea6de618..c8a238f6 100644 --- a/bash/bash_completion.d/eds.bash +++ b/bash/bash_completion.d/eds.bash @@ -11,17 +11,12 @@ _eds() { done < <( 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 + # Make globbing case-insensitive if appropriate + while read -r _ setting ; do + case $setting in + ('completion-ignore-case on') + shopt -s nocaseglob + break ;; esac done < <(bind -v) diff --git a/bash/bash_completion.d/man.bash b/bash/bash_completion.d/man.bash index 1efa7c52..f92dda95 100644 --- a/bash/bash_completion.d/man.bash +++ b/bash/bash_completion.d/man.bash @@ -35,17 +35,12 @@ _man() { shopt -u dotglob shopt -s extglob 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 + # Make globbing case-insensitive if appropriate + while read -r _ setting ; do + case $setting in + ('completion-ignore-case on') + shopt -s nocaseglob + break ;; esac done < <(bind -v) diff --git a/bash/bash_completion.d/mysql.bash b/bash/bash_completion.d/mysql.bash index ad153adc..d88219bf 100644 --- a/bash/bash_completion.d/mysql.bash +++ b/bash/bash_completion.d/mysql.bash @@ -19,17 +19,12 @@ _mysql() { # Set options so that globs expand 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 + # Make globbing case-insensitive if appropriate + while read -r _ setting ; do + case $setting in + ('completion-ignore-case on') + shopt -s nocaseglob + break ;; esac done < <(bind -v) diff --git a/bash/bash_completion.d/pass.bash b/bash/bash_completion.d/pass.bash index ec5959be..5d507133 100644 --- a/bash/bash_completion.d/pass.bash +++ b/bash/bash_completion.d/pass.bash @@ -23,17 +23,12 @@ _pass() shopt -u dotglob shopt -s globstar 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 + # Make globbing case-insensitive if appropriate + while read -r _ setting ; do + case $setting in + ('completion-ignore-case on') + shopt -s nocaseglob + break ;; esac done < <(bind -v) diff --git a/bash/bash_completion.d/path.bash b/bash/bash_completion.d/path.bash index 8b72a062..da867880 100644 --- a/bash/bash_completion.d/path.bash +++ b/bash/bash_completion.d/path.bash @@ -26,17 +26,12 @@ _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 + # Make globbing case-insensitive if appropriate + while read -r _ setting ; do + case $setting in + ('completion-ignore-case on') + shopt -s nocaseglob + break ;; esac done < <(bind -v) diff --git a/bash/bash_completion.d/sd.bash b/bash/bash_completion.d/sd.bash index 578a69fd..9694de1f 100644 --- a/bash/bash_completion.d/sd.bash +++ b/bash/bash_completion.d/sd.bash @@ -17,17 +17,12 @@ _sd() { # 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 + # Make globbing case-insensitive if appropriate + while read -r _ setting ; do + case $setting in + ('completion-ignore-case on') + shopt -s nocaseglob + break ;; esac done < <(bind -v) diff --git a/bash/bash_completion.d/ud.bash b/bash/bash_completion.d/ud.bash index aa59a4fc..278fbbc3 100644 --- a/bash/bash_completion.d/ud.bash +++ b/bash/bash_completion.d/ud.bash @@ -13,17 +13,12 @@ _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 + # Make globbing case-insensitive if appropriate + while read -r _ setting ; do + case $setting in + ('completion-ignore-case on') + shopt -s nocaseglob + break ;; esac done < <(bind -v) -- cgit v1.2.3