{"record":{"id":"31a175a934d4ba75","repo":"nikivdev/code","slug":"unknown-f-pr-feedback-option-token","errorCode":null,"errorMessage":"unknown `f pr feedback` option: {token}","messagePattern":"unknown `f pr feedback` option: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/commit.rs","lineNumber":9873,"sourceCode":"    let mut record_todos = false;\n    let mut show_full = true;\n    let mut open_cursor = false;\n    for token in args.iter().skip(1) {\n        match token.as_str() {\n            \"--todo\" | \"todo\" => record_todos = true,\n            \"--full\" | \"full\" => show_full = true,\n            \"--compact\" | \"compact\" => show_full = false,\n            \"--cursor\" | \"cursor\" => open_cursor = true,\n            \"--help\" | \"-h\" => {\n                return Ok(Some(PrFeedbackCommand {\n                    selector: Some(\"--help\".to_string()),\n                    record_todos: false,\n                    show_full: true,\n                    open_cursor: false,\n                }));\n            }\n            _ if token.starts_with(\"--\") => {\n                bail!(\"unknown `f pr feedback` option: {token}\");\n            }\n            _ => {\n                if selector.is_some() {\n                    bail!(\"multiple PR selectors provided. Use exactly one selector.\");\n                }\n                selector = Some(token.clone());\n            }\n        }\n    }\n\n    Ok(Some(PrFeedbackCommand {\n        selector,\n        record_todos,\n        show_full,\n        open_cursor,\n    }))\n}\n","sourceCodeStart":9855,"sourceCodeEnd":9891,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/commit.rs#L9855-L9891","documentation":"The `f pr feedback` subcommand parses tokens positionally: known flags are matched, and any token starting with `--` that isn't recognized is rejected with this error. Only PR selectors (non-flag tokens) are accepted otherwise. It is an argument-validation guard against typos in option names.","triggerScenarios":"Passing an unsupported flag to `f pr feedback`, e.g. a misspelled `--ful` instead of `--full`, or a flag belonging to another subcommand; scripting errors injecting extra flags.","commonSituations":"Typo in a long option (`--shw-full`), copying flags from `f pr` into `f pr feedback`, shell variable expanding into an unexpected flag token.","solutions":["Check `f pr feedback --help` for the supported options and fix the flag spelling.","Remove the unrecognized flag and re-run.","Quote or fix the shell variable that expanded into the bad token."],"exampleFix":"// before\nf pr feedback --ful PR-123\n// after\nf pr feedback --show-full PR-123","handlingStrategy":"validation","validationCode":"const KNOWN = new Set([\"--show-full\", \"--todos\", \"--no-todos\"]);\nconst bad = tokens.filter(t => t.startsWith(\"--\") && !KNOWN.has(t));\nif (bad.length) throw new Error(`unknown option(s): ${bad.join(\", \")}`);","typeGuard":null,"tryCatchPattern":"try { await feedback(args); }\ncatch (e) {\n  if (String(e).includes(\"unknown `f pr feedback` option\")) {\n    console.error(\"Check `f pr feedback --help` for valid flags\");\n  } else throw e;\n}","preventionTips":["Consult `f pr feedback --help` for the exact option names.","Quote shell variables so they don't expand into stray `--` tokens.","Copy flags only from the same subcommand's help.","Add flag whitelisting in wrapper scripts."],"tags":["cli","argument-validation","unknown-flag"],"backgroundTag":"unknown-cli-option","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}