nushell/crates
Eric Hodel c26fca7419
Add Argument::span() and Call::arguments_span() (#10983)
# Description

These make it easy to make a Span that covers an entire argument and the
span of all arguments in a Call.

Call::arguments_span() is useful for errors where a command may accept
arguments or the pipeline, but not both.

Argument::span() is useful for errors where an arguments is incompatible
with one or more other arguments.

In particular, I wish to use this to create an error for an
implementation of #9563 that either allows arguments to set limits:

```nushell
limits set RLIMIT_NOFILE --soft 255 --hard 1024
```

Or pipeline:

```nushell
{name: RLIMIT_NOFILE, soft: 255} | limits set
```

But not both:

```
❯ [{name: RLIMIT_NOFILE, soft: 255, hard: 1024}] | limits set AS --soft 5 --hard 5
Error: nu:🐚:incompatible_parameters

  × Incompatible parameters.
   ╭─[source:1:1]
 1 │ [{name: RLIMIT_NOFILE, soft: 255, hard: 1024}] | limits set AS --soft 5 --hard 5
   · ───────────────────────┬──────────────────────              ──────────┬─────────
   ·                        │                                              ╰── or arguments, not both
   ·                        ╰── Supply either pipeline
   ╰────
```

# User-Facing Changes

Only nushell Command API changes
2023-11-19 21:43:56 +01:00
..
nu_plugin_custom_values Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_example Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_formats Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_gstat Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_inc Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu_plugin_python remove vectorize_over_list from python plugin (#9905) 2023-08-03 16:46:48 +02:00
nu_plugin_query Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-cli Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-cmd-base Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-cmd-dataframe Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-cmd-extra Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-cmd-lang remove def-env and export def-env (#10999) 2023-11-19 23:25:09 +08:00
nu-color-config Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-command Convert ShellError::NetworkFailure to named fields (#11093) 2023-11-19 21:32:11 +01:00
nu-engine Convert ShellError::CommandNotFound to named fields (#11094) 2023-11-19 21:31:28 +01:00
nu-explore Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-glob Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-json Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-lsp Apply nightly clippy fixes (#11083) 2023-11-17 09:15:55 -06:00
nu-parser remove def-env and export def-env (#10999) 2023-11-19 23:25:09 +08:00
nu-path Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-plugin Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-pretty-hex Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-protocol Add Argument::span() and Call::arguments_span() (#10983) 2023-11-19 21:43:56 +01:00
nu-std std: add cross platform null-device name (#11070) 2023-11-17 14:49:07 +01:00
nu-system bump rust-toolchain to 1.72.1 (#11079) 2023-11-16 15:14:45 -06:00
nu-table optimize/clean up a few of the table changes (#11076) 2023-11-16 11:37:46 -06:00
nu-term-grid Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01:00
nu-test-support Testing support tweaks: exit status in Outcome (#10692) 2023-11-15 23:50:43 +01:00
nu-utils Bump version to 0.87.1 (#11056) 2023-11-15 23:50:11 +01: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.