Skip to content

Commit 57561fb

Browse files
author
Rémi Laurent
committed
fix(_comp__included_ssh_config_files): ignore comments
1 parent 3039122 commit 57561fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bash_completion

+1-1
Original file line numberDiff line numberDiff line change
@@ -2447,7 +2447,7 @@ _comp__included_ssh_config_files()
24472447
# https://github.com/openssh/openssh-portable/blob/5ec5504f1d328d5bfa64280cd617c3efec4f78f3/readconf.c#L2240
24482448
local max_depth=16
24492449
while ((${#included[@]} > 0 && depth++ < max_depth)); do
2450-
_comp_split include_files "$(command sed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\(.*\)$/\1/p' "${included[@]}")" || return
2450+
_comp_split include_files "$(command sed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\([^#]*\).*$/\1/p' "${included[@]}")" || return
24512451
included=()
24522452
for i in "${include_files[@]}"; do
24532453
if [[ $i != [~/]* ]]; then

0 commit comments

Comments
 (0)