Skip to content

Commit

Permalink
fix(known_hosts_real): use _comp_expand_glob to avoid failglob
Browse files Browse the repository at this point in the history
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
  • Loading branch information
akinomyoga and scop committed Aug 6, 2023
1 parent 712715d commit 672215e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bash_completion
Expand Up @@ -2441,7 +2441,9 @@ _known_hosts_real()
[[ -r $i && ! -d $i ]] && kh+=("$i")
done
for i in /etc/ssh2/knownhosts ~/.ssh2/hostkeys; do
[[ -d $i ]] && khd+=("$i"/*pub)
[[ -d $i ]] || continue
_comp_expand_glob tmpkh '"$i"/*pub'
((${#tmpkh[@]})) && khd+=("${tmpkh[@]}")
done
fi

Expand Down

0 comments on commit 672215e

Please sign in to comment.