Skip to content

cmds/core/cat: handle "-" to comply with POSIX#2567

Merged
rminnich merged 4 commits into
u-root:mainfrom
binjip978:cat-dash
Jan 10, 2023
Merged

cmds/core/cat: handle "-" to comply with POSIX#2567
rminnich merged 4 commits into
u-root:mainfrom
binjip978:cat-dash

Conversation

@binjip978
Copy link
Copy Markdown
Contributor

Signed-off-by: Siarhiej Siemianczuk pdp.eleven11@gmail.com

Signed-off-by: Siarhiej Siemianczuk <pdp.eleven11@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Nov 17, 2022

Codecov Report

Base: 74.85% // Head: 74.85% // Increases project coverage by +0.00% 🎉

Coverage data is based on head (566315c) compared to base (b289ec4).
Patch coverage: 80.00% of modified lines in pull request are covered.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2567   +/-   ##
=======================================
  Coverage   74.85%   74.85%           
=======================================
  Files         408      408           
  Lines       41344    41349    +5     
=======================================
+ Hits        30946    30950    +4     
- Misses      10398    10399    +1     
Impacted Files Coverage Δ
cmds/core/cat/cat.go 68.00% <80.00%> (+3.00%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment thread cmds/core/cat/cat.go
Comment thread cmds/core/cat/cat_test.go
@rminnich rminnich added the Awaiting author Waiting for new changes or feedback for author. label Nov 18, 2022
@rminnich
Copy link
Copy Markdown
Member

btw -- is there a "posix command test suite" out there somewhere? Would be nice to be able to test these things with a robot.

@binjip978 binjip978 added Awaiting reviewer Waiting for a reviewer. and removed Awaiting author Waiting for new changes or feedback for author. labels Dec 26, 2022
Copy link
Copy Markdown
Member

@rminnich rminnich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole - thing always seems like a failure of vision to me, and it's a cancer, we're going to end up with commands that support it and commands that don't. But given that none of us has come up with something less nasty, well, we can do this for now. Eeek.

I'd tend to requiring people to learn to type /dev/fd/0, but ... that's not a standard, anywhere, so it goes.

@rminnich rminnich added Awaiting author Waiting for new changes or feedback for author. and removed Awaiting reviewer Waiting for a reviewer. labels Dec 27, 2022
@rminnich rminnich merged commit bbfa3bf into u-root:main Jan 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Awaiting author Waiting for new changes or feedback for author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants