Closed mrincredibleu closed 1 year ago
Thank you for reporting this.
Proposed solution: Change
hexyl -C
orhexyl --characters
to show a character panel and show no character panel withhexyl --no-characters
.
Agreed. Let's do this.
The behaviour of
hexyl
with no flags could be inverted to show no character panel as well, in order to match the behaviour ofhexdump
, though this is a matter of opinion.
I'd rather leave the current default. But with the proposed feature above, you could set alias hexdump="hexyl --no-characters"
and then use -C
to override it when needed (later options override earlier ones).
hexyl -C
does not show a character panel to the right of the hex output whilehexdump -C
does.Conversely, when using the commands without any flags,
hexyl
does show a character panel to the right of the hex output whilehexdump
does not (This I do understand, since arguably a hex viewer is most useful to a human user with a character panel, therefore showing a character panel should be the default behaviour).This behaviour is confusing when hexdump is used as an alias to hexyl (
alias hexdump='hexyl --color auto'
) in an interactive shell. I understand that aliasing hexdump to hexyl may not be smart in all usecases, especially when flags are used with the hexdump alias that are not implemented by hexyl. I personally only really usehexdump -C
and would likehexyl -C
to do the same thing.For my own purposes I could implement
hexdump
as a shell function that inverts the presence of the-C
flag before passing its function arguments on to hexyl, but I would prefer to avoid this kind of complexity.Proposed solution: Change
hexyl -C
orhexyl --characters
to show a character panel and show no character panel withhexyl --no-characters
. The behaviour ofhexyl
with no flags could be inverted to show no character panel as well, in order to match the behaviour ofhexdump
, though this is a matter of opinion.