8000 pr: Doesn't allow for omitted optional argument to `-n` · Issue #3109 · uutils/coreutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

pr: Doesn't allow for omitted optional argument to -n #3109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ljrk0 opened this issue Feb 10, 2022 · 5 comments · Fixed by #3185
Closed

pr: Doesn't allow for omitted optional argument to -n #3109

ljrk0 opened this issue Feb 10, 2022 · 5 comments · Fixed by #3185
Labels

Comments

@ljrk0
Copy link
ljrk0 commented Feb 10, 2022

Test case:

$ pr -n foo.txt
# successfully prints foo.txt with line numbers
$ uu-pr -n foo.txt
# waits for input on stdin since foo.txt is seen as argument to `-n`

The POSIX manpages specifies that the arguments to -n are to directly follow this option, as far as I can see, i.e., -n1 would be allowed, while -n 1 would be seen as "number lines, input file '1'". That's how GNU handles it as well.

@cakebaker
Copy link
Contributor

I'm unable to reproduce this issue using Rust 1.58 on Archlinux.

@ljrk0
Copy link
Author
ljrk0 commented Feb 23, 2022

Hm, same here.

$ uu-pr --version
pr 0.0.12
$ rustc --version
rustc 1.58.1 (db9d1b20b 2022-01-20)
$ paru -Qo uu-pr
/usr/bin/uu-pr is owned by uutils-coreutils 0.0.12-1
$ paru -Si uutils-coreutils
Repository      : community
Name            : uutils-coreutils
Version         : 0.0.12-1
Description     : Cross-platform Rust rewrite of the GNU coreutils
Architecture    : x86_64
URL             : https://github.com/uutils/coreutils
Licenses        : MIT
Groups          : None
Provides        : None
Depends On      : glibc  gcc-libs
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 9,48 MiB
Installed Size  : 102,40 MiB
Packager        : Orhun Parmaksız <orhun@archlinux.org>
Build Date      : Mi 19 Jan 2022 20:56:54 CET
Validated By    : MD5 Sum  SHA-256 Sum  Signature

@ljrk0
Copy link
Author
ljrk0 commented Feb 23, 2022

Nvm, the issue went away since I last tested :)

@ljrk0 ljrk0 closed this as completed Feb 23, 2022
@ljrk0 ljrk0 reopened this Feb 23, 2022
@ljrk0
Copy link
Author
ljrk0 commented Feb 23, 2022

Nevermind, it seems to only happen with certain filenames, e.g., f1.txt, that is, those, that contain a number(?)

@cakebaker
Copy link
Contributor

Yes, now I'm able to reproduce it.

8000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants
0