mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-17 20:51:55 +01:00
Check for wildcard/conditional host patterns in ~/.ssh/config
before normalizing for connections dropdown (#1743)
This commit is contained in:
parent
e555eaa765
commit
68a88857cb
@ -877,8 +877,11 @@ func resolveSshConfigPatterns(configFiles []string) ([]string, error) {
|
||||
// for each host, find the first good alias
|
||||
for _, hostPattern := range host.Patterns {
|
||||
hostPatternStr := hostPattern.String()
|
||||
if hostPatternStr == "" || strings.Contains(hostPatternStr, "*") || strings.Contains(hostPatternStr, "?") || strings.Contains(hostPatternStr, "!") {
|
||||
continue
|
||||
}
|
||||
normalized := remote.NormalizeConfigPattern(hostPatternStr)
|
||||
if !strings.Contains(hostPatternStr, "*") && !strings.Contains(hostPatternStr, "?") && !strings.Contains(hostPatternStr, "!") && !alreadyUsed[normalized] {
|
||||
if !alreadyUsed[normalized] {
|
||||
discoveredPatterns = append(discoveredPatterns, normalized)
|
||||
alreadyUsed[normalized] = true
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user