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

Please don't print the header before input is seen #47

Closed
FauxFaux opened this issue Jan 26, 2019 · 2 comments
Closed

Please don't print the header before input is seen #47

FauxFaux opened this issue Jan 26, 2019 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@FauxFaux
Copy link

hexyl appears to print the "header" (the top of the box) too soon.

If you have an app that thinks before printing output (e.g. gpg), it is unnecessarily ugly.

Something like this:

% (echo Er... >&2; sleep 0.2; \
 echo Thinking... >&2; sleep 0.2; \
 echo Um... >&2; sleep 0.2; \
 echo Output, finally; \
 echo 'Done!' >&2) | hexyl

Typically (it's racy!) looks like:

Er...
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
Thinking...
Um...
Done!
│00000000│ 4f 75 74 70 75 74 2c 20 ┊ 66 69 6e 61 6c 6c 79 0a │Output, ┊finally_│
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘

I'd rather it showed:

Er...
Thinking...
Um...
┌────────┬─────────────────────────┬─────────────────────────┬────────┬────────┐
│00000000│ 4f 75 74 70 75 74 2c 20 ┊ 66 69 6e 61 6c 6c 79 0a │Output, ┊finally_│
└────────┴─────────────────────────┴─────────────────────────┴────────┴────────┘
Done!

Gaming the thinking is probably easy. Gaming the Done! is probably impossible. (gpg doesn't print the done.)

@sharkdp
Copy link
Owner

sharkdp commented Jan 28, 2019

Sounds good to me.

@sharkdp
Copy link
Owner

sharkdp commented Feb 6, 2019

Fixed by @mziter in #51.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants