Skip to content

Instantly share code, notes, and snippets.

@fdncred
Last active November 3, 2023 12:24
Show Gist options
  • Select an option

  • Save fdncred/7e3255ee504f7728997a179b4522c6da to your computer and use it in GitHub Desktop.

Select an option

Save fdncred/7e3255ee504f7728997a179b4522c6da to your computer and use it in GitHub Desktop.
known nushell bugs

Recurring Known Bugs that need to be fixed before 1.0

input_output_types order of execution vs matching

The `input_output_types`` are parsed from top to bottom instead of matching on the appropriate ones. This makes some thing fail because the first one succeeds gets output versus the right one.

Example:

 http get https://index.crates.io/ba/se/base64 | lines | last | from json
Error: nu::parser::input_type_mismatch

  × Command does not support list<any> input.
   ╭─[entry #7:1:1]
 1  http get https://index.crates.io/ba/se/base64 | lines | last | from json
   ·                                                                ────┬────
   ·                                                                    ╰── command doesn't support list<any> input
   ╰────

If I switch the order of the input_output_types of the last command, it works fine.

 http get https://index.crates.io/ba/se/base64 | lines | last | from json
╭────────────┬────────────────────────────────────────────────────────────────╮
│name        │base64                                                          
│vers        │0.21.5                                                          
│deps        [table 6 rows]                                                  
│cksum       │35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9│
│features    {record 3 fields}                                               
│yanked      │false                                                           
│rust_version│1.48.0                                                          
╰────────────┴────────────────────────────────────────────────────────────────╯
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment