-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
from-ssv cuts off columns from lsmod #910
Comments
cc @t-hart |
Just as one more data point: |
Ah, that's a great use case for it! Good one. It seems that the readme hasn't been updated, by the way (and I also notice that the format for flags for the Also, how should the command handle missing columns/values? The current version will collapse multiple separators if there are any, which means that you may get rows with different numbers of columns. Both from |
Good question - this feels like something we'll need a few examples from the real world to play with and try to understand how people who are using the command will need it to work. Did you have a few examples lying around that you want to work? We could scrub them and use them in our tests/designs. |
Sure do! A very stripped down version of the issue is the file:
When parsed without the --aligned-columns flag, you get this:
With --aligned-columns, you get this:
In this example, the table is clearly designed to be used with aligned columns, and so that naturally gives a better output, but what if the file looked like this?
In this case, the columns aren't aligned and the space separator is used as a hard limit. Is this intended to be turned into this?
At the moment it won't because extra spaces after the separator before a different character get collapsed into the separator. And the same goes for something like this:
where the last row only has two values where the other rows have three. Is this well formed? There's quite a few ways of coming at this, and I'm not sure what the best way to solve it is. We could say that missing values are allowed, but only with Anyway, I really appreciate your feedback and perspectives. Seeing as there seems to be a fair bit more to discuss on this, should we open a new issue for it? |
Describe the bug
If you do
lsmod | from-ssv
, the results seem to cut the columns evenly without separating based on spaces. Example in screenshot.To Reproduce
Steps to reproduce the behavior:
lsmod | from-ssv
Expected behavior
Even if columns don't perfectly line up, I think we want to "do the right thing" and just parse them based on the spaces rather than guessing the columns. We could retain the column mode as a separate flag.
Screenshots
![Screenshot from 2019-11-03 16-06-11](https://user-images.githubusercontent.com/547158/68079775-eb019180-fe53-11e9-8ff6-0bf3e536f655.png)
Configuration (please complete the following information):
The text was updated successfully, but these errors were encountered: