nushell/crates
mike 0e4729b203
improve parsing of values with units (#9190)
closes #9111 

# Description

this pr improves parsing of values with units (`filesizes`, `durations`
and any other **future values**) by:

1. allowing underscores in the value part
```nu
> 42kb          # okay
> 42_sec        # okay
> 1_000_000mib  # okay
> 69k_b         # not okay, underscores not allowed in the unit
```

2. improving error messages involving these values
```nu
> sleep 40-sec

# before
Error: nu::parser::parse_mismatch

  × Parse mismatch during operation.
   ╭─[entry #42:1:1]
 1 │ sleep 40-sec
   ·       ──┬──
   ·         ╰── expected duration with valid units
   ╰────

# now
Error:
  × duration value must be a number
   ╭─[entry #41:1:1]
 1 │ sleep 40-sec
   ·       ─┬─
   ·        ╰── not a number
   ╰────
```

3. unifying parsing of these values. now all of these use one function

# User-Facing Changes

filesizes and durations can now have underscores for readability
2023-05-17 18:54:35 -05:00
..
nu_plugin_custom_values bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu_plugin_example bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu_plugin_formats bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu_plugin_gstat bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu_plugin_inc bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu_plugin_python update nu_plugin_python due to signature changes (#8107) 2023-02-18 13:27:24 +00:00
nu_plugin_query bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-cli Avoid blocking when o+e> redirects too much stderr message (#8784) 2023-05-17 17:47:03 -05:00
nu-cmd-lang Feature: Userland LazyRecords (#8332) 2023-05-17 18:35:22 -05:00
nu-color-config bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-command improve parsing of values with units (#9190) 2023-05-17 18:54:35 -05:00
nu-engine Feature: Userland LazyRecords (#8332) 2023-05-17 18:35:22 -05:00
nu-explore bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-glob bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-json bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-parser improve parsing of values with units (#9190) 2023-05-17 18:54:35 -05:00
nu-path bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-plugin bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-pretty-hex bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-protocol Feature: Userland LazyRecords (#8332) 2023-05-17 18:35:22 -05:00
nu-std fix spurious 'item not found' error in std help (#9197) 2023-05-17 20:02:23 +02:00
nu-system bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-table bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-term-grid bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-test-support bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
nu-utils bump nushell from release version to development version (#9215) 2023-05-17 07:59:01 -05:00
README.md Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00

Nushell core libraries and plugins

These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.

Foundational libraries are split into two kinds of crates:

  • Core crates - those crates that work together to build the Nushell language engine
  • Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.

Plugins are likewise also split into two types:

  • Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
  • Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.