{"record":{"id":"9be046e2738286df","repo":"junegunn/fzf","slug":"tab-stop-must-be-a-positive-integer","errorCode":null,"errorMessage":"tab stop must be a positive integer","messagePattern":"tab stop must be a positive integer","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options.go","lineNumber":3521,"sourceCode":"\t\t\treturn errors.New(\"unexpected value for \" + arg + \": \" + *val)\n\t\t}\n\t}\n\t*index += len(allArgs)\n\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","sourceCodeStart":3503,"sourceCodeEnd":3539,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options.go#L3503-L3539","documentation":"fzf requires --tabstop to be at least 1, since it defines how many columns a tab character occupies. A tabstop of 0 or below would cause division/layout problems, so the check at options.go:3521 rejects opts.Tabstop < 1.","triggerScenarios":"Passing --tabstop=0 or a negative number. Any value < 1 after parsing triggers errors.New(\"tab stop must be a positive integer\").","commonSituations":"Scripts passing a computed tab width that collapses to 0; assuming 0 means 'use default'.","solutions":["Use 1 or greater (default is 8)","Clamp computed values to at least 1","Omit the option for the default"],"exampleFix":"# before\nfzf --tabstop=0\n# after\nfzf --tabstop=8","handlingStrategy":"validation","validationCode":"// Shell: enforce tabstop >= 1\n[ \"$tabstop\" -ge 1 ] || tabstop=8\nexec fzf --tabstop=\"$tabstop\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Floor computed tabstop values at 1","Default is 8; omit the flag unless you need custom tabs","Treat 0 as invalid, not as 'auto'"],"tags":["fzf","cli","validation","layout"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}