Skip to content

Commit 672215e

Browse files
akinomyogascop
andcommitted
fix(known_hosts_real): use _comp_expand_glob to avoid failglob
Co-authored-by: Ville Skyttä <[email protected]>
1 parent 712715d commit 672215e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

bash_completion

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2441,7 +2441,9 @@ _known_hosts_real()
24412441
[[ -r $i && ! -d $i ]] && kh+=("$i")
24422442
done
24432443
for i in /etc/ssh2/knownhosts ~/.ssh2/hostkeys; do
2444-
[[ -d $i ]] && khd+=("$i"/*pub)
2444+
[[ -d $i ]] || continue
2445+
_comp_expand_glob tmpkh '"$i"/*pub'
2446+
((${#tmpkh[@]})) && khd+=("${tmpkh[@]}")
24452447
done
24462448
fi
24472449

0 commit comments

Comments
 (0)