Add the possibility to ignore the Match directive

This commit is contained in:
fferro
2024-07-17 10:23:07 +01:00
parent 1d09c0b505
commit e2d4055e4e
7 changed files with 125 additions and 57 deletions
+3 -2
View File
@@ -34,7 +34,7 @@ Host *.example.com
Compression yes
`
cfg, _ := ssh_config.Decode(strings.NewReader(config))
cfg, _ := ssh_config.Decode(strings.NewReader(config), false)
val, _ := cfg.Get("test.example.com", "Compression")
fmt.Println(val)
// Output: yes
@@ -53,6 +53,7 @@ func ExampleUserSettings_ConfigFinder() {
u := ssh_config.UserSettings{}
u.ConfigFinder(func() string {
return filepath.Join("testdata", "test_config")
})
},
)
u.Get("example.com", "Host")
}