github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/shell/autocomplete/execs_windows.go (about) 1 //go:build windows 2 // +build windows 3 4 package autocomplete 5 6 import ( 7 "strings" 8 9 "github.com/lmorg/murex/utils/consts" 10 ) 11 12 // listExes called listExesWindows which exists in execs.go because it needs to 13 // be called when murex runs inside WSL 14 func listExes(path string, exes map[string]bool) { 15 listExesWindows(path, exes) 16 } 17 18 func matchExes(s string, exes map[string]bool) (items []string) { 19 for name := range exes { 20 lc := strings.ToLower(s) 21 if strings.HasPrefix(strings.ToLower(name), lc) { 22 switch { 23 //case isSpecialBuiltin(name): 24 // items = append(items, name[len(s):]) 25 case consts.NamedPipeProcName == name: 26 // do nothing 27 default: 28 items = append(items, name[len(s):]) 29 } 30 } 31 } 32 33 return 34 }