pr: incorrectly interprets argument to -n
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Environment: uutils main branch (git commit 799de29ec1439401df47434a207d0180a686522b), GNU pr version 9.9
Steps to reproduce:
echo "abc" > f && pr -n f
What happens now: uutils pr waits for user input on stdin.
What I expected to happen: GNU pr correctly renders the file f with line numbers:
2026-01-17 21:36 f Page 1
1 abc
<truncated lots of blank lines below...>
Notes: I believe uutils pr is incorrectly interpreting the argument f as the argument to -n.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing echo "abc" > f && pr -n f in the uutils pr implementation and compare its argument parsing with GNU pr. Trace why f is consumed as the -n argument; done means the command reads file f, does not wait on stdin, and renders numbered output like GNU pr.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100