Comments (17)
Thank you for reporting this. This should be easy to fix, yes.
from hexyl.
Fixed in v0.4.0.
from hexyl.
Reproducible in multiple terminal emulators. Consistenly nice only in linux text terminal.
from hexyl.
This is what ctrl-c looks like on Mac OS X
from hexyl.
If somebody has an idea how to fix this, let me know.
from hexyl.
Well, part of the problem is synchronous handling of ctrl+c. If you move process exit into the handler, the situation improves. I'm not sure what's actually safe to be called from a signal handler in Rust though (normally described in: man 7 signal-safety).
It's still a bit of a problem, I assume because of stdout buffering. May need some uglier tricks to work around (setbuf?).
from hexyl.
A possibly related issue is that on MacOS, when running hexyl without any input the application can't be terminated. Like this:
This is with hexyl 0.6.0 on MacOS 10.14.6
from hexyl.
@secworks That looks like a different bug to me (much less esoteric than this one; thank you for reporting it). It would be great if you could create a new ticket.
from hexyl.
With the changes in #84, this is now open again. In my terminal and on zsh
, this is not an issue. But apparently it causes problems in some terminal/shell combinations.
from hexyl.
@sharkdp Have you tried using alternative buffer when opening the application ?
The smcup
/ rmcup
capability of the terminal ?
from hexyl.
Using an alternative buffer would mean that you have to handle scrolling yourself and you can't see the output anymore after you exit hexyl
.
from hexyl.
I guess the only other thing i can think of is disabling echo and reenabling it after quitting, but you probably already did that right?
from hexyl.
I'm not sure what that means?
from hexyl.
echo is when you press a key it displays on the terminal, but i think it is already disabled otherwise any key would be visible on a press
from hexyl.
Echo is enabled. I can still type stuff while I run cat /dev/zero | pv -q -L 16 | hexyl
(read zeros at a rate of 16 bytes per second)
from hexyl.
@bjorn3 You are right
I've been able to test it with little bash (does not work on zsh)
orig=$(stty -g)
stty -echo
hexyl /dev/urandom
stty $orig
And it doesnt show the ^C
anymore
from hexyl.
I'm closing this due to inactivity. And because I can not reproduce this on my machine. Please feel free to comment in case it should be re-opened.
from hexyl.
Related Issues (20)
- Add option to disable printing 0 bytes as ascii 0. HOT 1
- `--no-characters` causes output artifacts when squeezing lines HOT 5
- Is there a cheat sheet anywhere telling what color correlates to category of byte? HOT 3
- Add support for the NO_COLOR environment variable HOT 4
- Regression: broken pipe error
- Make --panels=auto the new default? HOT 3
- hexyl should not fail if `--panels=auto` is used and output is not a TTY
- Identical lines not squeezed HOT 3
- hexyl -C does the inverse of hexdump -C HOT 1
- Request: publish source tar with generated manpage HOT 3
- Support for different code pages / character tables
- Incorrect output when reading from terminal HOT 2
- Feature request: Ship as a crate HOT 3
- `hexyl /dev/zero` hangs HOT 6
- Display some non-printable characters like `bat --show-all` HOT 5
- Feature request: Comodore prg mode HOT 1
- CI artifact names conflict HOT 2
- Provide Statically Compiled Binaries for (aarch64|arm64) Linux
- Support raw output HOT 2
- Customize colors
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hexyl.