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

Supply table instead of closure to merge command in tables.md #919

Merged
merged 1 commit into from Jun 2, 2023
Merged

Supply table instead of closure to merge command in tables.md #919

merged 1 commit into from Jun 2, 2023

Conversation

lavafroth
Copy link
Contributor

If the merge command is supplied an expression in curly braces, nushell errors out expecting input and argument, to be both record or both table.

Tested on nushell 0.80.0

To reproduce this error, run:

let first = [[a b]; [1 2]]
let second = [[c d]; [3 4]]
$first | merge { $second }

We get:

× Pipeline mismatch.
   ╭─[entry #5:1:1]
 1 │ $first | merge { $second }
   · ───┬──   ──┬──
   ·    │       ╰── expected: input, and argument, to be both record or both table
   ·    ╰── value originates from here
   ╰────

We don't get errors if we use:

$first | merge $second

If the merge command is supplied an expression in curly braces, nushell errors out expecting input and argument, to be both record or both table.
Copy link
Member

@amtoine amtoine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds right to me, thanks for the fix 😊

@sholderbach sholderbach merged commit cfe8c3c into nushell:main Jun 2, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants