Skip to content

[1 2 3] | select (-2) makes nushell unresponsive #12346

@Schweber

Description

@Schweber

Describe the bug

I was trying to get the second-to-last item of a list. range (-2)..(-2) works but is cumbersome.

I then tried to use select (-2) but this makes my instance of nushell unresponsive and even C-c has no effect. I have to close my terminal to terminate it.

How to reproduce

  1. run [1 2 3] | select (-2)

Expected behavior

I expect nu to select the second-to-last row/entry/item etc.

If i'm using the wrong command for this purpose, i expect nu not to become unresponsive.

Configuration

key value
version 0.91.0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.76.0 (07dca489a 2024-02-04) (built from a source tarball)
cargo_version cargo 1.76.0
build_time 1980-01-01 00:00:00 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, trash, which, zip
installed_plugins

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triageAn issue that hasn't had any proper look

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions