{"record":{"id":"58fa299982c5e283","repo":"junegunn/fzf","slug":"at-most-3-tiebreaks-are-allowed-str","errorCode":null,"errorMessage":"at most 3 tiebreaks are allowed: ${str}","messagePattern":"at most 3 tiebreaks are allowed: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options.go","lineNumber":1403,"sourceCode":"\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcriteria = append(criteria, byLength)\n\t\tcase \"begin\":\n\t\t\tif err := check(&hasBegin, \"begin\"); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcriteria = append(criteria, byBegin)\n\t\tcase \"end\":\n\t\t\tif err := check(&hasEnd, \"end\"); err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tcriteria = append(criteria, byEnd)\n\t\tdefault:\n\t\t\treturn nil, errors.New(\"invalid sort criterion: \" + str)\n\t\t}\n\t}\n\tif len(criteria) > 4 {\n\t\treturn nil, errors.New(\"at most 3 tiebreaks are allowed: \" + str)\n\t}\n\treturn criteria, nil\n}\n\nfunc dupeTheme(theme *tui.ColorTheme) *tui.ColorTheme {\n\tdupe := *theme\n\treturn &dupe\n}\n\nfunc parseTheme(defaultTheme *tui.ColorTheme, str string) (*tui.ColorTheme, *tui.ColorTheme, error) {\n\tvar err error\n\tvar baseTheme *tui.ColorTheme\n\ttheme := dupeTheme(defaultTheme)\n\trrggbb := regexp.MustCompile(\"^#[0-9a-fA-F]{6}$\")\n\tcomma := regexp.MustCompile(`[\\s,]+`)\n\tfor _, str := range comma.Split(strings.ToLower(str), -1) {\n\t\tstr = strings.TrimSpace(str)\n\t\tif len(str) == 0 {","sourceCodeStart":1385,"sourceCodeEnd":1421,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options.go#L1385-L1421","documentation":"After parsing, parseTiebreak verifies the criteria slice (which always starts with the implicit byScore) has at most 4 entries — i.e. at most 3 user-specified tiebreaks. A longer list returns this error with the original --tiebreak string.","triggerScenarios":"--tiebreak chunk,length,begin,end,pathname (5 tokens), --tiebreak length,begin,end,pathname (4 tokens > 3 allowed).","commonSituations":"Kitchen-sink configs trying to fully determinize ordering; options accumulated across FZF_DEFAULT_OPTS and an explicit CLI flag; scripted lists grown over time.","solutions":["Trim to at most 3 criteria: --tiebreak chunk,length,begin","If full determinism is needed, put index last and drop weaker criteria: --tiebreak length,index"],"exampleFix":"# before\nfzf --tiebreak chunk,length,begin,end\n# after\nfzf --tiebreak chunk,length,begin","handlingStrategy":"validation","validationCode":"IFS=',' read -ra C <<< \"$TB\"\n[ \"${#C[@]}\" -le 3 ] || { echo 'at most 3 tiebreaks allowed' >&2; exit 1; }\nfzf --tiebreak \"$TB\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cap tiebreak lists at 3 criteria","If you need deterministic order, end with index and drop weaker criteria","Review accumulated FZF_DEFAULT_OPTS when adding new criteria"],"tags":["fzf","options-parsing","sorting","tiebreak","go"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}