{"record":{"id":"413b7865883c7e8c","repo":"junegunn/fzf","slug":"empty-jump-labels","errorCode":null,"errorMessage":"empty jump labels","messagePattern":"empty jump labels","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options.go","lineNumber":3525,"sourceCode":"\n\tif opts.HeaderLines < 0 {\n\t\treturn errors.New(\"header lines must be a non-negative integer\")\n\t}\n\n\tif opts.HscrollOff < 0 {\n\t\treturn errors.New(\"hscroll offset must be a non-negative integer\")\n\t}\n\n\tif opts.ScrollOff < 0 {\n\t\treturn errors.New(\"scroll offset must be a non-negative integer\")\n\t}\n\n\tif opts.Tabstop < 1 {\n\t\treturn errors.New(\"tab stop must be a positive integer\")\n\t}\n\n\tif len(opts.JumpLabels) == 0 {\n\t\treturn errors.New(\"empty jump labels\")\n\t}\n\n\tif opts.FreezeLeft < 0 || opts.FreezeRight < 0 {\n\t\treturn errors.New(\"number of fields to freeze must be a non-negative integer\")\n\t}\n\n\tif validateJumpLabels {\n\t\tfor _, r := range opts.JumpLabels {\n\t\t\tif r < 32 || r > 126 {\n\t\t\t\treturn errors.New(\"non-ascii jump labels are not allowed\")\n\t\t\t}\n\t\t}\n\t}\n\treturn err\n}\n\nfunc applyPreset(opts *Options, preset string) error {\n\t// Reset to the platform default","sourceCodeStart":3507,"sourceCodeEnd":3543,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options.go#L3507-L3543","documentation":"fzf requires the --jump-labels charset to be non-empty; the labels are the characters used for jump mode (--bind jump), so an empty set makes jumping impossible. The check at options.go:3525 fires when len(opts.JumpLabels) == 0.","triggerScenarios":"Passing --jump-labels='' (explicitly empty). The option was recognized and applied, leaving an empty label list, which the post-parse validation rejects.","commonSituations":"Scripts templating the label string from a variable that is sometimes empty; attempting to 'reset' labels by passing an empty string instead of omitting the flag.","solutions":["Provide at least one printable ASCII label (default is ascii)","Omit --jump-labels to use the default set","Guard templated values so empty strings fall back to the default"],"exampleFix":"# before\nfzf --jump-labels=''\n# after\nfzf --jump-labels=abcdefghijklmnopqrstuvwxyz","handlingStrategy":"validation","validationCode":"// Shell: fall back to default when empty\n[ -n \"$labels\" ] || labels='ascii'\nexec fzf --jump-labels=\"$labels\"","typeGuard":"func validJumpLabels(s string) bool { return len([]rune(s)) > 0 }","tryCatchPattern":null,"preventionTips":["Never pass an explicit empty string to disable an option; omit it instead","Default template variables that feed --jump-labels","Validate label sets in wrapper configs before launch"],"tags":["fzf","cli","validation","jump-mode"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}