{"record":{"id":"8322c1312e27881e","repo":"nikivdev/code","slug":"multiple-pr-selectors-provided-use-exactly-one-se","errorCode":null,"errorMessage":"multiple PR selectors provided. Use exactly one selector.","messagePattern":"multiple PR selectors provided\\. Use exactly one selector\\.","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/commit.rs","lineNumber":9877,"sourceCode":"        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\nfn parse_github_pr_url(input: &str) -> Option<(String, u64)> {\n    let trimmed = input.trim().trim_end_matches('/');\n    let prefix = \"https://github.com/\";\n    let rest = trimmed.strip_prefix(prefix)?;","sourceCodeStart":9859,"sourceCodeEnd":9895,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/commit.rs#L9859-L9895","documentation":"`f pr feedback` accepts exactly one PR selector. During token parsing, if a second non-flag token appears after a selector has already been set, the parser bails with this error. Ambiguity between multiple selectors would be unresolvable, so it fails fast.","triggerScenarios":"Invoking `f pr feedback` with two or more PR identifiers/URLs/branch names, e.g. `f pr feedback 123 456`; an unquoted string containing spaces being split by the shell into multiple tokens (e.g. `f pr feedback PR #42`).","commonSituations":"Pasting a PR title or URL with spaces without quoting; scripting that appends a default selector to a user-supplied one; passing both a number and a branch name.","solutions":["Provide exactly one selector and re-run.","Quote arguments containing spaces: `f pr feedback \"PR #42\"`.","Remove the duplicated/default selector from the calling script."],"exampleFix":"// before\nf pr feedback 123 456\n// after\nf pr feedback 123","handlingStrategy":"validation","validationCode":"const selectors = args.filter(t => !t.startsWith(\"--\"));\nif (selectors.length > 1) throw new Error(\"exactly one PR selector required\");","typeGuard":null,"tryCatchPattern":"try { await feedback(args); }\ncatch (e) {\n  if (String(e).includes(\"multiple PR selectors\")) console.error(\"Pass exactly one selector\");\n  else throw e;\n}","preventionTips":["Pass exactly one PR number/branch/URL per invocation.","Quote arguments containing spaces to avoid shell word-splitting.","In scripts, don't append a default selector when the user already supplied one."],"tags":["cli","argument-validation","selector"],"backgroundTag":"too-many-arguments","analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}