Skip to content

columns too wide with --no-header #469

Open
@shaicoleman

Description

@shaicoleman

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions