Skip to content
This repository was archived by the owner on Jun 30, 2026. It is now read-only.
This repository was archived by the owner on Jun 30, 2026. It is now read-only.

transpose is not an involution #71

Description

@amtoine
  • run
ls | nu_plugin_explore
  • press t to transpose the table
  • press t again, nothing happens

this boils down to the fact that, in Nushell, $table | transpose | transpose and $record | transpose | transpose are not the same as table and $record respectively, you'd have to define inverse commands such as

use std assert

def "transpose inv-record" []: {
    transpose --header-row | into record
}

def "transpose inv-table" []: {
    transpose --header-row
}

assert equal ($nu | transpose | transpose inv-record) $nu
assert equal (ls | transpose | transpose inv-table) (ls)

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions