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

columns too wide with --no-header #469

Open
shaicoleman opened this issue Nov 28, 2024 · 1 comment
Open

columns too wide with --no-header #469

shaicoleman opened this issue Nov 28, 2024 · 1 comment
Assignees
Labels

Comments

@shaicoleman
Copy link

shaicoleman commented Nov 28, 2024

Describe the bug
When using --format=table and --no-header, the width of columns takes into the width of the headers, even though they aren't visible.

To Reproduce

echo "very_wide_field_header,header2\n1,2" > /tmp/header-width-bug.csv
sq add /tmp/header-width-bug.csv --active
echo With headers:
sq sql 'SELECT * FROM data' --format=table
echo
echo Without headers:
sq sql 'SELECT * FROM data' --format=table --no-header

Output

With headers:
very_wide_field_header  header2
1                       2

Without headers:
1                       2

Expected behavior

Column width should only take into account what's visible.

sq version
v0.48.4 / linux / amd64

@shaicoleman shaicoleman changed the title fields too wide with --no-header columns too wide with --no-header Nov 28, 2024
@neilotoole
Copy link
Owner

@shaicoleman: Ah, that's definitely a bug.

That entire table output mechanism is something that needs to be rewritten from top-to-bottom, tbf. It's a bit of a disaster zone. I'll put this in the backlog, perhaps there's a quick fix.

@neilotoole neilotoole self-assigned this Jan 20, 2025
@neilotoole neilotoole added the bug label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants