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

Terminal output is not aware of width #4

Closed
archiewood opened this issue Aug 9, 2024 · 3 comments
Closed

Terminal output is not aware of width #4

archiewood opened this issue Aug 9, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@archiewood
Copy link

archiewood commented Aug 9, 2024

Cool project!
I'm pretty interested in something like this for counting GH stars or similar for open source projects

Tested with Github

Result is difficult to read

  • MacOS: Sonoma 14.2.1
  • Terminal: Version 2.14 (452)
  • Anyquery 0.1.2

CleanShot 2024-08-09 at 18 55 10

@julien040
Copy link
Owner

Hi, yes it's a known issue.

Anyquery is aware of the terminal width but when there are too many columns, it can't perform well.
A width of 203 characters for 36 columns leaves only 5.6 characters per column.

I honestly don't know how to fix that. If I remember correctly, DuckDB shows ellipsis. But that would truncate output sometimes. Or maybe anyquery should print a warning message.

In the meantime, you can try to print fewer columns or print in a format with less width such as json or linebyline. To do so, run .format [format name] in the shell.
Sorry for not being able to fix it

@julien040 julien040 self-assigned this Aug 10, 2024
@julien040 julien040 added the bug Something isn't working label Aug 10, 2024
@archiewood
Copy link
Author

yeah duckdb's "duckbox" output implementation is quite nice, they truncate some of the middle columns and show first and last up to the width

@julien040
Copy link
Owner

Hi @archiewood,
I've finally fixed this issue.

Sl55Ioet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants