diff --git a/cmd/utility.go b/cmd/utility.go index b5588c9..787ae81 100644 --- a/cmd/utility.go +++ b/cmd/utility.go @@ -31,16 +31,12 @@ func packageCfg(args []string) (*pkg.ConfigCtx, error) { return nil, err } cfgCtx.PrefixFilter = ast - // Old parser. - //cfgCtx.PrefixFilter = pkg.ParsePrefixFilter("*") } else { ast, err := prefixcomp.ParsePrimaryFilter(args[0]) if err != nil { return nil, err } cfgCtx.PrefixFilter = ast - // Old parser. - //cfgCtx.PrefixFilter = pkg.ParsePrefixFilter(args[0]) } } else { ast, err := prefixcomp.ParsePrimaryFilter("*") @@ -48,8 +44,6 @@ func packageCfg(args []string) (*pkg.ConfigCtx, error) { return nil, err } cfgCtx.PrefixFilter = ast - // Old parser. - //cfgCtx.PrefixFilter = pkg.ParsePrefixFilter("*") } // The 1st arg along with the rest - [1:] when provided is a remote command to execute. diff --git a/pkg/config_ctx.go b/pkg/config_ctx.go index ba07211..f4b8783 100644 --- a/pkg/config_ctx.go +++ b/pkg/config_ctx.go @@ -105,36 +105,3 @@ func ParseColumns(s string) mapset.Set[string] { return m } - -//type PrefixFilter struct { -// originalQuery string -// orPrefixes []string -//} -// -//func (p *PrefixFilter) IsAll() bool { -// return len(p.orPrefixes) == 1 && (p.orPrefixes[0] == "*" || p.orPrefixes[0] == "@") -//} -// -//func (p *PrefixFilter) Count() int { -// return len(p.orPrefixes) -//} -// -//func (p *PrefixFilter) PrefixAt(idx int) string { -// return p.orPrefixes[idx] -//} - -//func ParsePrefixFilter(s string) *PrefixFilter { -// var prefixes []string -// parts := strings.Split(s, "|") -// for _, p := range parts { -// prefixes = append(prefixes, strings.TrimSpace(p)) -// } -// -// slices.Sort(prefixes) -// -// pf := &PrefixFilter{ -// originalQuery: s, -// orPrefixes: prefixes, -// } -// return pf -//}