Comments (13)
You can pipe to less
, if you use the -R
/--RAW-CONTROL-CHARS
option (or export LESS="-R"
):
export LESS="-R" # I suggest adding this to your shells RC file
hexyl … | less
from hexyl.
Hello. It would be useful if hexyl
piped to less
automatically rather than requiring user to manually pipe.
from hexyl.
Re-opening this to see what others think.
from hexyl.
This sounds like an appealing feature, but I'm not aware of what the drawbacks might be, and piping through less is pretty straightforward. What pain did this cause with bat?
I would also say the default behavior of --color
should probably be auto
, not always
, but maybe that's a discussion for another thread.
from hexyl.
I'd rather not implement paging by default, see #30 (comment)
I'd urge you to reconsider. Not sure what kind of pain it caused in bat
but most modern (after git
) CLI do this and it's very surprising when you try a very modern tool like hexyl and it doesn't do paging by default. I added colors and paging by default to gst-inspect
command 2 years ago and except for a few people, everyone was super thankful.
As long as there is an easy option to disable paging and colors, even the folks who don't want it will be fine. Your decision of course!
from hexyl.
Not sure what kind of pain it caused in bat
What pain did this cause with bat?
If you want a taste of it, you can take a look at sharkdp/bat#1053 😄. See the list of bug tickets in the first bullet point.
I would also say the default behavior of
--color
should probably beauto
, notalways
, but maybe that's a discussion for another thread.
All my other applications use "auto" by default. We decided to use "always" for hexyl, because (1) the defining feature of hexyl
is the colored output and (2) because it makes it much easier for users to pipe to less
.
If we decide to add automatic paging, we could certainly switch to "auto".
from hexyl.
@siedentop I don't think a lack of paging is related to your issue. Unix piping runs all processes at once, streaming the stdout between them - rather than waiting for the preceding one to finish, which could get blocked by a bad paging implementation, if that's what you were thinking. You haven't provided detail of what you're searching for (which may not work given the line wrapping of the output). But it could be the ANSI colour characters causing your trouble, as Hexyl does not automatically disable colour when piping - try --color=never
. If that's not it, you should open your own issue.
from hexyl.
Thanks, @ZimbiX. If I use hexyl --color=never <file> | rg foo
it works. If I use --color=auto
it also works. So, maybe --color
should default to auto? (But that's been addressed by David above.)
from hexyl.
I'd rather not implement paging by default, see #30 (comment)
from hexyl.
Not sure what kind of pain it caused in bat
What pain did this cause with bat?
If you want a taste of it, you can take a look at sharkdp/bat#1053 smile. See the list of bug tickets in the first bullet point.
I might be wrong but seems the majority of those issues are Windows-specific. IMHO it's a lot more important to provide a good user experience than portability across all OSes.
If we decide to add automatic paging, we could certainly switch to "auto".
👍
from hexyl.
IMHO it's a lot more important to provide a good user experience than portability across all OSes.
as long as you are using one of the supported OSes? 😄
from hexyl.
Hi David,
I found this ticket by searching for 'pipe' in the list of issues.
I don't know how paging exactly relates to this but anyway: My use case is that I wanted to use hexyl <file> | rg foo
. This didn't work and instead I used xxd <file> | rg foo
.
If paging support would help my use case, then I would very much appreciate paging support.
from hexyl.
I'm closing this due to inactivity. 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.