File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2558,9 +2558,12 @@ __load_completion()
25582558 [[ -d $dir ]] || continue
25592559 for compfile in " $cmd " " $cmd .bash" " _$cmd " ; do
25602560 compfile=" $dir /$compfile "
2561- # Avoid trying to source dirs; https://bugzilla.redhat.com/903540
2561+ # Avoid trying to source dirs as long as we support bash < 4.3
2562+ # to avoid an fd leak; https://bugzilla.redhat.com/903540
25622563 if [[ -d $compfile ]]; then
2563- echo " bash_completion: $compfile : is a directory" >&2
2564+ # Do not warn with . or .. (especially the former is common)
2565+ [[ $compfile == */.?(.) ]] ||
2566+ echo " bash_completion: $compfile : is a directory" >&2
25642567 elif [[ -e $compfile ]] && . " $compfile " ; then
25652568 [[ $backslash ]] && $( complete -p " $cmd " ) " \\ $cmd "
25662569 return 0
You can’t perform that action at this time.
0 commit comments