-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Panick when a call to a custom command with many arguments is typed in interactively #12069
Copy link
Copy link
Closed
Labels
A:parserIssues related to parsingIssues related to parsingcategory:bugSomething isn't workingSomething isn't workingdeprecated:duplicate(deprecated: use GitHub's "close as duplicate" feature) This issue is a duplicate of another issue(deprecated: use GitHub's "close as duplicate" feature) This issue is a duplicate of another issuepanic
Milestone
Description
Describe the bug
When trying to call amcustom command with many arguments via the command line, Nushell is panicking.
How to reproduce
# Start a nested shell
nu
# Then register a custom command with many args
def "a" [ b: string, c: string, d: string, e: string, f: string, g: string ] {}
# Then type in the following:
a b c d e
When pressing the 'e', you will get a panick error and the subshell is exiting:
thread 'main' panicked at crates/nu-parser/src/parser.rs:777:28:
index out of bounds: the len is 2 but the index is 3
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Expected behavior
don't panick ;-)
Screenshots
Configuration
| key | value |
|---|---|
| version | 0.90.1 |
| branch | |
| commit_hash | |
| build_os | macos-aarch64 |
| build_target | aarch64-apple-darwin |
| rust_version | rustc 1.75.0 (82e1608df 2023-12-21) (built from a source tarball) |
| cargo_version | cargo 1.75.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 |
Additional context
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A:parserIssues related to parsingIssues related to parsingcategory:bugSomething isn't workingSomething isn't workingdeprecated:duplicate(deprecated: use GitHub's "close as duplicate" feature) This issue is a duplicate of another issue(deprecated: use GitHub's "close as duplicate" feature) This issue is a duplicate of another issuepanic