Skip to content

Commit 9d57f05

Browse files
authored
refactor(_comp_compgen_known_hosts): simplify the sed expression
1 parent ffc2178 commit 9d57f05

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bash_completion

Lines changed: 1 addition & 1 deletion
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 -n -e 's/[[:blank:]]*#.*//' -e '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

24522452
included=()
24532453
for i in "${include_files[@]}"; do

0 commit comments

Comments
 (0)