Skip to content

Commit

Permalink
fix update error
Browse files Browse the repository at this point in the history
  • Loading branch information
xwjdsh committed Jan 5, 2022
1 parent 98d5d5d commit a903759
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sshconfig.go → manssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,20 @@ func parseConfig(p string) (map[string]*ssh_config.Config, map[string]*HostConfi
configMap := map[string]*ssh_config.Config{p: cfg}

for _, host := range cfg.Hosts {
isInclude := false
for _, node := range host.Nodes {
switch t := node.(type) {
case *ssh_config.Include:
isInclude = true
for fp, config := range t.GetFiles() {
configMap[fp] = config
addHosts(aliasMap, fp, config.Hosts...)
}
case *ssh_config.KV:
addHosts(aliasMap, p, host)
}
}
if !isInclude {
addHosts(aliasMap, p, host)
}
}
addHosts(aliasMap, p, &ssh_config.Host{
Patterns: []*ssh_config.Pattern{(&ssh_config.Pattern{}).SetStr("*")},
Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions models.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"

"github.com/fatih/color"

"github.com/xwjdsh/ssh_config"
)

Expand Down

0 comments on commit a903759

Please # to comment.