diff --git a/interface.go b/interface.go index ec2ea3e..02e6fec 100644 --- a/interface.go +++ b/interface.go @@ -104,6 +104,7 @@ type Peco struct { skipReadConfig bool styles StyleSet use256Color bool + fuzzyLongestSort bool // Source is where we buffer input. It gets reused when a new query is // executed. @@ -299,6 +300,7 @@ type Config struct { QueryExecutionDelay int StickySelection bool MaxScanBufferSize int + FuzzyLongestSort bool // If this is true, then the prefix for single key jump mode // is displayed by default. diff --git a/peco.go b/peco.go index 966d2be..1ef92d3 100644 --- a/peco.go +++ b/peco.go @@ -568,6 +568,7 @@ func (p *Peco) ApplyConfig(opts CLIOptions) error { if len(p.initialFilter) <= 0 { p.initialFilter = opts.OptInitialMatcher } + p.fuzzyLongestSort = p.config.FuzzyLongestSort if err := p.populateFilters(); err != nil { return errors.Wrap(err, "failed to populate filters")