Skip to content

"command doesn't support range input" #19552

Closed

Description

@pheenty

Basics

  • I have done a basic search through the issue tracker to find similar or related issues.
  • I have made myself familiar with the available features of Nushell for the particular area this enhancement request touches.

Related problem

Let's say I want this:

0..0.1..1 | math sin

However,

Error: nu::parser::input_type_mismatch

  × Command does not support range input.
   ╭─[repl_entry #14:1:13]
 1 │ 0..0.1..1 | math sin
   ·             ────┬───
   ·                 ╰── command doesn't support range input
   ╰────

And this applies to some other math commands:
It's at least:

  • all trig functions (sin, arctan etc.), including hyperbolic (cosh etc.)
  • ln and log
  • exp

Describe the solution you'd like

Make ranges implicitly convert to a list if a function takes a list of numbers but not a range directly.
Just implementing range inputs for the commands listed above also kinda works but that's treating a symptom instead of the disease

Describe alternatives you've considered

You can explicitly convert range to a list with... each {}:

❯ 0..0.1..1 | each {} | math sin
╭────┬──────╮
│  0 │ 0.00 │
│  1 │ 0.10 │
│  2 │ 0.20 │
│  3 │ 0.30 │
│  4 │ 0.39 │
│  5 │ 0.48 │
│  6 │ 0.56 │
│  7 │ 0.64 │
│  8 │ 0.72 │
│  9 │ 0.78 │
│ 10 │ 0.84 │
╰────┴──────╯

But that is really counterintuitive, let alone you shouldn't have to explicitly convert it in the first place

Additional context and details

No response

Activity

  1. added
    category:enhancement
    status:needs-triage
    on Nov 15, 2026
  2. kronberger-droid commented on Nov 17, 2026

    @kronberger-droid
    Contributor

    On 0.117 math sin, math cos, math arctan, math cosh, math ln and math exp reject a range, but math log takes one: 1..3 | math log 10 works, as do 1..3 | math sqrt and 1..3 | math abs.

    AI:X EXECUTE

  3. pheenty commented on Nov 17, 2026

    @pheenty
    ContributorAuthor

    Ok true, log works
    I checked that ln doesn't and assumed log doesn't too, but that's even more inconsistent this way then

  4. added a commit that references this issue on Nov 23, 2026
    e43f7c9
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

    category:enhancementstatus:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions