Skip to content
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

Output generated file to stdout #117

Closed
pacak opened this issue Aug 8, 2022 · 5 comments · Fixed by #120
Closed

Output generated file to stdout #117

pacak opened this issue Aug 8, 2022 · 5 comments · Fixed by #120
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@pacak
Copy link

pacak commented Aug 8, 2022

In *nix land specifying - as a file name usually means stdin for input and stdout for output. When I used -o - it created a file called - which is a bit odd.

Also can you consider disabling clap's colors in help by default? relevant docs. Color scheme they use by default makes it harder to read than no color at all but I'd like to keep colors in the remaining output so setting NO_COLOR env var is not a solution.

@msrd0
Copy link
Owner

msrd0 commented Aug 8, 2022

I agree, - should be stdout. PRs welcome.

Regarding the colored help output, I don't think that it makes it harder to read. This is what it looks like in my terminal (alacritty):

Screenshot_2022-08-08-14-31-26

You can of course always use |cat to remove colors, i.e. cargo doc2readme -h |cat will display the help message without colors.

@msrd0 msrd0 added enhancement New feature or request help wanted Extra attention is needed labels Aug 8, 2022
@pacak
Copy link
Author

pacak commented Aug 8, 2022

This is what it looks like in my terminal (alacritty):

Bright spots are distracting and my eye keeps slipping...

You can of course always use |cat to remove colors, i.e. cargo doc2readme -h |cat will display the help message without colors.

There's several ways to do this but ideally it shouldn't be necessary in the first place.

@msrd0
Copy link
Owner

msrd0 commented Aug 8, 2022

There's several ways to do this but ideally it shouldn't be necessary in the first place.

Well, removing colors is much easier than adding them, so I think I'll keep 'em on by default.

@msrd0
Copy link
Owner

msrd0 commented Nov 28, 2022

Just FYI, I just updated clap to 4.0 and the colors seems to be gone now: #201

@pacak
Copy link
Author

pacak commented Nov 28, 2022

Yes, clap is less bright now and default formatting is more compact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants