Skip to content

--wrapped option in custom command parses rest arguments (...rests) as glob instead of of their correct type #18370

Closed

Description

@tstmax67

Bug report form

  • I have done a basic search of the issue tracker to find any existing issues that are similar.
  • I have checked that my version is at least the latest stable release available via my installation method.

Describe the bug

The (--wrapped) option in custom command is parsing all the rest parameters (...rests) as glob instead of of their correct type. For example bare strings are being parsed as glob, and same with numbers, bools, paths. So If I check their type using describe, it says those are globs. Also custom commands are not accepting closures either and throws error. However it does not happen with quoted strings(any type of quotation), lists or records. This is occurring since I have updated my nushell to latest version: 0.113.1.
Note: This is only an issue in version 0.113.1 and 0.113.0. Things work as expected in 0.112.2 and versions before that.

How to reproduce

[~] 🐢
➤ def demo [...rests] {
print $rests.0
print ($rests.0 | describe)
}

[~] 🐢
➤ demo kanata
kanata
string

[~] 🐢
➤ demo {print ok}
closure_1323
closure

[~] 🐢
➤ def demo --wrapped [...rests] {
print $rests.0
print ($rests.0 | describe)
}

[~] 🐢
➤ demo kanata
kanata
glob

[~] 🐢
➤ demo {print ok}
Error: nu::parser::parse_mismatch_with_full_string_msg

  × Parse mismatch during operation.
   ╭─[repl_entry #60:1:6]
 1 │ demo {print ok}
   ·      ─────┬────
   ·           ╰── expected non-block value: external-argument
   ╰────


[~] 1
➤ demo 8
8
glob

[~] 🐢
➤ demo 8.92
8.92
glob

Expected behavior

I'm expecting nushell to show proper types of custom command arguments if --wrapped is used when defining the command. For example based on the terminal output I provided I should have got "string" for demo kanata, "int" for demo 8 and "closure" for demo { print ok }.

Configuration

key value
version 0.113.1
major 0
minor 113
patch 1
branch makepkg
commit_hash 7b7df4a
build_os linux-x86_64
build_target x86_64-unknown-linux-gnu
rust_version rustc 1.95.0 (59807616e 2026-04-14) (Arch Linux rust 1:1.95.0-1)
cargo_version cargo 1.95.0 (f2d3ce0bd 2026-03-21) (Arch Linux rust 1:1.95.0-1)
build_time 2026-05-30 01:03:10 +00:00
build_rust_channel release
allocator standard
features default, mcp, network, plugin, rustls-tls, sqlite, trash-support
installed_plugins
experimental_options example=false, reorder-cell-paths=true, pipefail=true, enforce-runtime-annotations=false, native-clip=false, cell-path-types=false

Activity

  1. added
    status:needs-triage
    on Jun 9, 2026
  2. added this to the v0.114.0 milestone on Jun 9, 2026
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

    status:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions