-
Notifications
You must be signed in to change notification settings - Fork 50
make default table output a bit more compact #241
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
base: master
Are you sure you want to change the base?
Conversation
This doesn't seem to have any effect for me locally. |
@@ -120,14 +120,25 @@ fn diff(opt: DiffOpt) -> Result<(), Box<dyn Error + Send + Sync>> { | |||
"Incremental hashing time", | |||
)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also use set_titles
.
@@ -192,6 +203,7 @@ fn summarize(opt: SummarizeOpt) -> Result<(), Box<dyn Error + Send + Sync>> { | |||
.sort_by(|l, r| r.self_time.cmp(&l.self_time)); | |||
|
|||
let mut table = Table::new(); | |||
table.set_format(*prettytable::format::consts::FORMAT_NO_LINESEP_WITH_TITLE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing for the diff command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
derp, I should have actually tested the diff
change.
I found the default formatting for
summarize summarize <file>
to be visually noisy and difficult to read because of the separators between each line:This change removes the separating lines
+-----+---+
between rows. This introduces a new problem where it is hard to read a line as there's often a lot of whitespace between the end of the item label and the beginning of the next column. I added some...
to pad out the line to make it easier to scan.A similar change has been made for the table output of the
summarize diff ...
command.I think the final result is able to present more data in a single screen, while also not sacrificing ease of scanning horizontally.