Skip to content

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

Merged
sharkdp merged 6 commits intosharkdp:masterfrom
mkatychev:feat/plain_output
May 22, 2022
Merged

Added --plain --no-chars and --no-position toggles#154
sharkdp merged 6 commits intosharkdp:masterfrom
mkatychev:feat/plain_output

Conversation

@mkatychev
Copy link
Copy Markdown
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
Comment thread src/lib.rs
@sharkdp
Copy link
Copy Markdown
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
Copy Markdown
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
Comment thread src/bin/hexyl.rs Outdated
Comment thread src/bin/hexyl.rs
Comment thread src/bin/hexyl.rs Outdated
Comment thread src/bin/hexyl.rs Outdated
Comment thread src/bin/hexyl.rs
Comment thread src/bin/hexyl.rs Outdated
Comment thread src/bin/hexyl.rs Outdated
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants