Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> uxy align

> Aligns the data with the headers. This is done by resizing the columns so that even the longest value fits into the column.

> ...

> This command doesn't work with infinite streams.

Does this do nothing with infinite streams or does it do a "rolling" alignment?

Even with an infinite stream you can keep track of the max width seen thus far and align all future output to those levels. It'll still have some jank to the initial alignment but assuming a consistent distribution of the lengths over time it'd be good enough for eyeballing the results.



Currently it uses the alignment of the headers as the default. It's only when a field exceeds the size of the header when the output is misaligned. The next record returns to the default alignment though.

I was thinking about adding a 'trim' command that would trim long fields to fit into the default field size.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: