Skip to content

Commit

Permalink
fix(ssh_config): apply patterns on all matching hosts
Browse files Browse the repository at this point in the history
Signed-off-by: Nathanael DEMACON <ndemacon@scaleway.com>
  • Loading branch information
quantumsheep committed Feb 23, 2024
1 parent 558082a commit 4452d28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ssh_config/host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,11 @@ impl HostVecExt for Vec<Host> {

pattern_indexes.push(i);

for j in (i + 1)..hosts.len() {
for j in 0..hosts.len() {
if i == j {
continue;
}

if !hosts[j].matching_pattern_regexes().is_empty() {
continue;
}
Expand Down

1 comment on commit 4452d28

@quantumsheep
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Closes #71

Please sign in to comment.