Skip to content

Commit

Permalink
Merge branch 'fix/load-completion-dot'
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Aug 20, 2022
2 parents 3368d9b + 16ce83f commit 40aa4dc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -2558,9 +2558,12 @@ __load_completion()
[[ -d $dir ]] || continue
for compfile in "$cmd" "$cmd.bash" "_$cmd"; do
compfile="$dir/$compfile"
# Avoid trying to source dirs; https://bugzilla.redhat.com/903540
# Avoid trying to source dirs as long as we support bash < 4.3
# to avoid an fd leak; https://bugzilla.redhat.com/903540
if [[ -d $compfile ]]; then
echo "bash_completion: $compfile: is a directory" >&2
# Do not warn with . or .. (especially the former is common)
[[ $compfile == */.?(.) ]] ||
echo "bash_completion: $compfile: is a directory" >&2
elif [[ -e $compfile ]] && . "$compfile"; then
[[ $backslash ]] && $(complete -p "$cmd") "\\$cmd"
return 0
Expand Down

0 comments on commit 40aa4dc

Please sign in to comment.