-
-
Notifications
You must be signed in to change notification settings - Fork 245
Open
Labels
enhancementNew feature or requestNew feature or request
Description
This is excellent, and the default width of 16 is great! It'd be really nice if we could print according to custom alignments, though -- this is a fairly standard feature in most hex editors, and I can't imagine it being egregiously complex to add this.
Another couple of ideas:
- Getting the max width based on a provided terminal width would be nice -- this would let me simply plug in a width and let
hexyl
calculate the space overhead of borders for me. - An auto-width flag (which is like the above for the current terminal width) to be used would also be handy -- it would have some overlap with the above, but there could be reasons for setting
Prototypical suggestion for options:
# Ideas for a fixed column width:
-c --columns Sets the number of hex data columns to be displayed.
Cannot be used with other width-setting options.
-w --width
# Ideas for terminal auto-width:
-a --auto-width Sets the number of hex data columns to be adjusted according
to the detected terminal width. Conceptually, this could be an
alias of `-t $terminal_width`.
Cannot be used with other width-setting options.
# Ideas for fixed terminal width:
-t --terminal-width Sets the number of terminal columns to be displayed.
Since the terminal width may not be an evenly divisible by the
width per hex data column, this will use the greatest number of
hex data columns that can fit in the requested width but still
leave some space to the right.
Cannot be used with other width-setting options.
I'm more than happy to push on this, if effort is a concern. :)
pinpox, unwiredben, utkuufuk, sharkdp, NicolaiSoeborg and 9 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request