Skip to content

A malformed range blocks Nushell #13586

@kaathewisegit

Description

@kaathewisegit

Describe the bug

Certain malformed ranges will block Nushell forever:

How to reproduce

~> 0..(glob .)
^C^C^C

~> 0..(open /dev/random)
^C^C^C

Expected behavior

To throw an error.

Screenshots

No response

Configuration

key value
version 0.96.0
major 0
minor 96
patch 0
branch
commit_hash
build_os linux-x86_64
build_target x86_64-alpine-linux-musl
rust_version rustc 1.80.0 (051478957 2024-07-21) (Alpine Linux 1.80.0-r0)
cargo_version cargo 1.80.0 (376290515 2024-07-16)
build_time 2024-07-29 21:29:54 +00:00
build_rust_channel release
allocator mimalloc
features default, sqlite, system-clipboard, trash
installed_plugins endecode 0.1.0

Additional context

Discovered this accidentally when I forgot to add a space and sent the following command:

~/project/search> cargo run -- fn...(glob ../fs/**/*.rs)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A:parserIssues related to parsingcategory:bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions