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

Feature request: line wrapping #773

Closed
jugglinmike opened this issue Jan 5, 2023 · 1 comment
Closed

Feature request: line wrapping #773

jugglinmike opened this issue Jan 5, 2023 · 1 comment

Comments

@jugglinmike
Copy link

Use case #1: data which includes newlines

Current behavior:

$ printf 'a,b,c\nshort,short,"two\nlines"\nshort,short,short' | csvlook
| a     | b     | c         |
| ----- | ----- | --------- |
| short | short | two
lines |
| short | short | short     |

Desired behavior:

$ printf 'a,b,c\nshort,short,"two\nlines"\nshort,short,short' | csvlook
| a     | b     | c         |
| ----- | ----- | --------- |
| short | short | two       |
|                 lines     |
| short | short | short     |

Use case #2: insertion of newlines to improve readability

Current behavior:

$ printf 'a,b,c\nshort,short,very very very very very very very very long\nshort,short,short' | csvlook
| a     | b     | c                                            |
| ----- | ----- | -------------------------------------------- |
| short | short | very very very very very very very very long |
| short | short | short                                        |

Desired behavior (with starperson --wrap-at flag):

$ printf 'a,b,c\nshort,short,very very very very very very very very long\nshort,short,short' | csvlook --wrap-at 44
| a     | b     | c                        |
| ----- | ----- | ------------------------ |
| short | short | very very very very very |
|                 very very very long      |
| short | short | short                    |

Relevant issue: gh-442. That documents requests for two separate features--wrapping and truncation--in this project and csvkit, but it was considered resolved with the introduction of truncation.

Thanks for maintaining a great tool!

@jpmckinney
Copy link
Member

Duplicate #749. Can you try installing the PR #750 and seeing if it suits your needs?

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

No branches or pull requests

2 participants