Comments (6)
Thank you for the feedback.
In this case, hexyl
is waiting for input from stdin. This is intended in order to allow users to pipe output into hexyl
, i.e.
tail -c 1024 some-file | hexyl
from hexyl.
It seems like it'd be pretty rare for somebody to be typing in a hex dump by hand. Maybe printing a warning to stderr
would be appropriate if a TTY is detected?
from hexyl.
It seems like it'd be pretty rare for somebody to be typing in a hex dump by hand. Maybe printing a warning to
stderr
would be appropriate if a TTY is detected?
That's probably correct and interactive TTY detection on STDIN would be a way to fix this, yes. Are there any other tools that do something like this, i.e. disable input from STDIN if its from a terminal? hexdump
, xxd
and all other Unix tools I can think of do not have this behavior.
from hexyl.
@sharkdp: I don't even necessarily know about disabling input if you print a warning, but that's an interesting idea. AFAIK, Unix is the only set of common terminal tools that deal with hex dumps. Windows' Powershell has Format-Hex
, but it's fairly hard to get it to use stdin
directly anyway.
from hexyl.
I think I'd like to just keep this as is. Maybe someone wants to copy & paste some data into the terminal. For example, copy & paste a Unicode string to see its UTF-8 representation with hexyl
.
Let me know if somebody has strong opinions on this, so I can reopen the ticket.
from hexyl.
+1 — the old Unix design guideline for command-line tools was/is "no news is good news".
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.