GithubHelp home page GithubHelp logo

Comments (6)

sharkdp avatar sharkdp commented on May 22, 2024

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.

ErichDonGubler avatar ErichDonGubler commented on May 22, 2024

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.

sharkdp avatar sharkdp commented on May 22, 2024

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.

ErichDonGubler avatar ErichDonGubler commented on May 22, 2024

@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.

sharkdp avatar sharkdp commented on May 22, 2024

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.

kilobyte avatar kilobyte commented on May 22, 2024

+1 — the old Unix design guideline for command-line tools was/is "no news is good news".

from hexyl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.