Skip to content

Commit

Permalink
fix(_comp__included_ssh_config_files): ignore comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémi Laurent committed Jun 3, 2024
1 parent 3039122 commit 57561fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -2447,7 +2447,7 @@ _comp__included_ssh_config_files()
# https://github.com/openssh/openssh-portable/blob/5ec5504f1d328d5bfa64280cd617c3efec4f78f3/readconf.c#L2240
local max_depth=16
while ((${#included[@]} > 0 && depth++ < max_depth)); do
_comp_split include_files "$(command sed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\(.*\)$/\1/p' "${included[@]}")" || return
_comp_split include_files "$(command sed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\([^#]*\).*$/\1/p' "${included[@]}")" || return
included=()
for i in "${include_files[@]}"; do
if [[ $i != [~/]* ]]; then
Expand Down

0 comments on commit 57561fb

Please sign in to comment.