Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added --plain --no-chars and --no-position toggles #154

Merged
merged 6 commits into from
May 22, 2022

Conversation

mkatychev
Copy link
Contributor

@mkatychev mkatychev commented Apr 22, 2022

New flags added:

OPTIONS:
    -p, --plain                 Display output with --no-chars, --no-position, and
                                --border=none.
    -C, --no-chars              Whether to display the character table on the right.
    -P, --no-position           Whether to display the position indicator on the left.

Motivation was mainly for diffing two separate binary files, borders could be removed but char table and position still created a lot of noise.

Output example:
image

@mkatychev mkatychev mentioned this pull request Apr 22, 2022
src/lib.rs Show resolved Hide resolved
@sharkdp
Copy link
Owner

sharkdp commented Apr 27, 2022

Before I proceed to review this: how does this integrate with what is being proposed in #149?

@mkatychev
Copy link
Contributor Author

mkatychev commented Apr 27, 2022

Before I proceed to review this: how does this integrate with what is being proposed in #149?

This PR does not toggle separators or modify existing border behaviour, it allows the toggling of the character table (on the right) and the hex position (on the right).

  • This PR allows one to disable the 1st and/or 3rd column
  • --plain disables both and applies the existing --border=none flag as a convenience flag

@mkatychev mkatychev requested a review from sharkdp May 7, 2022 01:39
src/bin/hexyl.rs Outdated Show resolved Hide resolved
src/bin/hexyl.rs Outdated Show resolved Hide resolved
src/bin/hexyl.rs Outdated Show resolved Hide resolved
src/bin/hexyl.rs Outdated Show resolved Hide resolved
src/bin/hexyl.rs Outdated Show resolved Hide resolved
Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thank you. Mainly have some questions regrading the command-line interface (option names)

@mkatychev mkatychev requested a review from sharkdp May 22, 2022 19:30
Copy link
Owner

@sharkdp sharkdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates!

@sharkdp sharkdp merged commit 6873867 into sharkdp:master May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants