Skip to content

Table cell still wrapping when using methodology: "truncating" in $env.config.table.trim #18966

Closed

Description

@2gibbert

Bug report form

  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.

Describe the bug

When using this config:

$env.config.table.trim = { methodology: "truncating", truncating_suffix: "..." }

I notice no difference compared to the default. Columns/cells that go over the screen width, always show ... (even with default config), BUT contents in the column right before it are wrapped.

This is noticeable with any wide table (e.g: ls -la) on a smaller res screen / large font size.

Additionally, with $env.config.table.header_on_separator = true, the header/footer text in the affected columns are still being truncated. Might be related to #17768 ?

Here's some screenshots ofls -la, along with the example table I gave in the "How to reproduce" section:

Image Image Image Image

How to reproduce

  1. Start Nushell with clean config (nu --no-config-file)
  2. Increase terminal font size
  3. Run ls -la. Or try printing this table
    [
    	{
    		"name": "whatever",
    		"type": "symlink",
    		"target": "/some/path",
    		"readonly": false,
    		"mode": "rwxrwxrwx",
    		"num_links": 1,
    		"inode": 12653657,
    		"user": "gibbert",
    		"group": "gibbert",
    		"size": 10,
    		"created": "2026-04-03T22:09:22.526691315+07:00",
    		"accessed": "2026-09-04T18:28:33.313157179+07:00",
    		"modified": "2026-04-03T22:09:22.526691315+07:00"
    	},
    ]
  4. $env.config.table.trim = { methodology: "truncating", truncating_suffix: "..." }
  5. Repeat step 3

Expected behavior

I expected that when using methodology: "truncating", no cell content would be wrapped, each row should span 1 line.

Configuration

key value
version 0.115.1
major 0
minor 115
patch 1
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.97.1 (8bab26f4f 2026-07-14) (built from a source tarball)
cargo_version cargo 1.97.0 (c980f4866 2026-06-30)
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator standard
features default, helix, lsp, mcp, network, plugin, rustls-tls, sqlite, trash-support
installed_plugins
experimental_options example=false, dc-glob=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=true, native-clip=false, cell-path-types=false, background-completions=true

Activity

  1. added
    status:needs-triage
    on Sep 4, 2026
  2. fdncred commented on Sep 4, 2026

    @fdncred
    Contributor

    I get this on the latest main.

    Image
  3. 2gibbert commented on Sep 5, 2026

    @2gibbert
    Author

    I just tried table -w 100 and table, that does give the output I wanted.

    $env.config.table.trim affects table's output, but not tables that are printed directly (without using | table), which still render weirdly.

    Is this intended? I'm very confused.

  4. fdncred commented on Sep 5, 2026

    @fdncred
    Contributor

    I agree that it's confusing. All tabular output runs through table whether you do | table or not. I'll see if I can figure out what is going on.

  5. webdevsamran commented on Sep 6, 2026

    @webdevsamran

    Hi team, I would like to work on this table formatting bug.

    When $env.config.table.trim methodology is set to 'truncating', table cells continue wrapping across lines under certain terminal widths rather than truncating with ellipsis. I can update cell measurement and trimming logic in crates/nu-table/ to ensure truncation methodology is respected, with test cases.

    Could you please assign this to me? Thanks!

  6. fdncred commented on Sep 6, 2026

    @fdncred
    Contributor

    I'm almost done with the change. I'll probably finish it up sometime tomorrow.

  7. fdncred commented on Sep 7, 2026

    @fdncred
    Contributor

    Can you please try out #18979 when you get a chance?

  8. 2gibbert commented on Sep 8, 2026

    @2gibbert
    Author

    Can you please try out #18979 when you get a chance?

    @fdncred Seems to be working well for me now, thank you for taking a look at it! ❤️

  9. added a commit that references this issue on Sep 8, 2026
  10. added this to the v0.116.0 milestone on Sep 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions