From 7464165197bbd1fd43a24c84ef3f94cadcdd4be7 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 2 Dec 2018 21:52:21 +1300 Subject: Update glob settings for manual page completion --- bash/bash_completion.d/man.bash | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'bash') diff --git a/bash/bash_completion.d/man.bash b/bash/bash_completion.d/man.bash index 31be9a95..4326c48a 100644 --- a/bash/bash_completion.d/man.bash +++ b/bash/bash_completion.d/man.bash @@ -24,20 +24,12 @@ _man() { COMPREPLY[ci++]=$comp done < <( - # Do not return dotfiles, give us extended globbing, and expand empty - # globs to just nothing + # Make globs expand appropriately shopt -u dotglob shopt -s nullglob - - # 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) + if _completion_ignore_case ; then + shopt -s nocaseglob + fi # Figure out the manual paths to search if hash amanpath 2>/dev/null ; then -- cgit v1.2.3