{"record":{"id":"0d6024d4c55d46d3","repo":"junegunn/fzf","slug":"invalid-walker-option-str","errorCode":null,"errorMessage":"invalid walker option: ${str}","messagePattern":"invalid walker option: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/options.go","lineNumber":1645,"sourceCode":"\treturn baseTheme, theme, err\n}\n\nfunc parseWalkerOpts(str string) (walkerOpts, error) {\n\topts := walkerOpts{}\n\tfor _, str := range strings.Split(strings.ToLower(str), \",\") {\n\t\tswitch str {\n\t\tcase \"file\":\n\t\t\topts.file = true\n\t\tcase \"dir\":\n\t\t\topts.dir = true\n\t\tcase \"hidden\":\n\t\t\topts.hidden = true\n\t\tcase \"follow\":\n\t\t\topts.follow = true\n\t\tcase \"\":\n\t\t\t// Ignored\n\t\tdefault:\n\t\t\treturn opts, errors.New(\"invalid walker option: \" + str)\n\t\t}\n\t}\n\tif !opts.file && !opts.dir {\n\t\treturn opts, errors.New(\"at least one of 'file' or 'dir' should be specified\")\n\t}\n\treturn opts, nil\n}\n\nvar (\n\targActionRegexp  *regexp.Regexp\n\tsplitRegexp      *regexp.Regexp\n\tactionNameRegexp *regexp.Regexp\n)\n\nfunc firstKey(keymap map[tui.Event]string) tui.Event {\n\tfor k := range keymap {\n\t\treturn k\n\t}","sourceCodeStart":1627,"sourceCodeEnd":1663,"githubUrl":"https://github.com/junegunn/fzf/blob/bd4efa277b49ef34ca4025bff9b1a288e1980eff/src/options.go#L1627-L1663","documentation":"The walker-options parser behind --walker file,dir,hidden,follow,... (fzf 0.48+ replacement for --find and friends). Each comma token must be one of the known walker flags (file, dir, hidden, follow, and later versions add follow-logical, shell, debug); '' is explicitly ignored. Any other token returns this error.","triggerScenarios":"--walker files (plural), --walker file,dir,symlink (unknown token), --walker default on versions without 'default', tokens with whitespace '--walker file, dir'.","commonSituations":"Migrating from --file/--dir flags with different vocabulary; skim/fd option names reused; older fzf builds (pre-0.48) that lack --walker entirely report an unknown-flag error instead; version-dependent tokens like follow-logical (0.54+).","solutions":["Use only known tokens: fzf --walker file,dir,hidden,follow","Check supported tokens for your binary: fzf --help | grep -A1 walker","Remove spaces after commas and plural forms","Upgrade fzf for newer tokens (follow-logical, shell) or drop them"],"exampleFix":"# before\nfzf --walker files,folders,hidden\n# after\nfzf --walker file,dir,hidden","handlingStrategy":"type-guard","validationCode":"WALKER='file,dir,hidden'\nIFS=',' read -ra W <<< \"$WALKER\"\nfor w in \"${W[@]}\"; do\n  case \"$w\" in file|dir|hidden|follow|follow-logical|shell|debug|'') ;; *) echo \"invalid walker option: $w\" >&2; exit 1;; esac\ndone\nfzf --walker \"$WALKER\"","typeGuard":"isValidFzfWalkerToken() { case \"$1\" in file|dir|hidden|follow|follow-logical|shell|debug|'') return 0;; *) return 1;; esac; }","tryCatchPattern":null,"preventionTips":["Use singular tokens: file/dir, not files/folders","No spaces after commas","Confirm your fzf version supports --walker at all (>= 0.48) and the specific tokens (follow-logical >= 0.54)","Wrap fzf in a function that normalizes walker options once"],"tags":["fzf","options-parsing","walker","file-discovery","go"],"backgroundTag":null,"analyzedSha":"bd4efa277b49ef34ca4025bff9b1a288e1980eff","analyzedAt":"2026-08-15T06:11:46.983Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}