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

Fix example history command pipeline #1043

Closed
wants to merge 1 commit into from
Closed

Conversation

ofek
Copy link

@ofek ofek commented Sep 4, 2023

❯ history | wrap cmd | where cmd =~ cargo
Error: nu::shell::type_mismatch

  × Type mismatch during operation.
   ╭─[entry #23:1:1]
 1 │ history | wrap cmd | where cmd =~ cargo
   · ───┬───                        ─┬ ──┬──
   ·    │                            │   ╰── string
   ·    │                            ╰── type mismatch for operator
   ·    ╰── record<start_timestamp: string, command: string, cwd: string, duration: duration, exit_status: int>
   ╰────

@hustcer
Copy link
Collaborator

hustcer commented Sep 4, 2023

Thanks, and the docs were generated by make_docs.nu and it's not recommend to modify it manually, it's better to fixed it here: https://github.com/nushell/nushell/blob/e5145358eb4a13436eccae58c7e07acc9666b661/crates/nu-cli/src/commands/history.rs#L142
BTW: wrap may be unnecessary here? history | where command =~ cargo | get command should works too

@fdncred
Copy link
Collaborator

fdncred commented Sep 4, 2023

Agreed. I don't think wrap is required anymore.

@ofek
Copy link
Author

ofek commented Sep 4, 2023

Thanks for the feedback! I opened nushell/nushell#10220

@ofek ofek closed this Sep 4, 2023
@ofek ofek deleted the patch-1 branch September 4, 2023 16:10
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.

3 participants