aboutsummaryrefslogtreecommitdiff
path: root/bash
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-12-02 21:52:21 +1300
committerTom Ryder <tom@sanctum.geek.nz>2018-12-02 21:52:21 +1300
commit7464165197bbd1fd43a24c84ef3f94cadcdd4be7 (patch)
tree6108e80645e008394f3540fca5b8caa8d71b8bc3 /bash
parentf7e84eaccac42f57e6781f235edbe639a2f2b70e (diff)
downloaddotfiles-7464165197bbd1fd43a24c84ef3f94cadcdd4be7.tar.gz
dotfiles-7464165197bbd1fd43a24c84ef3f94cadcdd4be7.zip
Update glob settings for manual page completion
Diffstat (limited to 'bash')
-rw-r--r--bash/bash_completion.d/man.bash16
1 files changed, 4 insertions, 12 deletions
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