nushell/crates/nu-cli/src
Stefan Holderbach f7b8f97873
Document and critically review ShellError variants - Ep. 2 (#8326)
Continuation of #8229 

# Description

The `ShellError` enum at the moment is kind of messy. 

Many variants are basic tuple structs where you always have to reference
the implementation with its macro invocation to know which field serves
which purpose.
Furthermore we have both variants that are kind of redundant or either
overly broad to be useful for the user to match on or overly specific
with few uses.

So I set out to start fixing the lacking documentation and naming to
make it feasible to critically review the individual usages and fix
those.
Furthermore we can decide to join or split up variants that don't seem
to be fit for purpose.

**Everyone:** Feel free to add review comments if you spot inconsistent
use of `ShellError` variants.

- Name fields of `SE::IncorrectValue`
- Merge and name fields on `SE::TypeMismatch`
- Name fields on `SE::UnsupportedOperator`
- Name fields on `AssignmentRequires*` and fix doc
- Name fields on `SE::UnknownOperator`
- Name fields on `SE::MissingParameter`
- Name fields on `SE::DelimiterError`
- Name fields on `SE::IncompatibleParametersSingle`

# User-Facing Changes

(None now, end goal more explicit and consistent error messages)

# Tests + Formatting

(No additional tests needed so far)
2023-03-06 11:31:07 +01:00
..
completions Resolve Clippy warnings inside tests. (#8315) 2023-03-04 14:58:20 +01:00
menus Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
commands.rs Remove perf flag to streamline logging configuration (#6834) 2022-10-21 10:20:21 -05:00
config_files.rs respect use_ansi_coloring configuration (#7912) 2023-02-02 00:03:05 +01:00
eval_file.rs pipe binary data to external commands (#8058) 2023-02-24 21:39:52 +01:00
lib.rs Split merging of parser delta and stack environment (#6005) 2022-07-14 17:09:27 +03:00
nu_highlight.rs Remove engine_state clones in REPL eval (#7713) 2023-01-10 17:22:32 -08:00
print.rs print pipeline contents in print (#8305) 2023-03-04 11:31:01 +13:00
prompt_update.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
prompt.rs Make the default prompt play nice with basic fonts (#8080) 2023-03-02 13:59:32 +13:00
reedline_config.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
repl.rs Document and critically review ShellError variants - Ep. 2 (#8326) 2023-03-06 11:31:07 +01:00
syntax_highlight.rs Support redirect err and out to different streams (#7685) 2023-01-12 10:22:30 +01:00
util.rs respect use_ansi_coloring configuration (#7912) 2023-02-02 00:03:05 +01:00
validation.rs Remove engine_state clones in REPL eval (#7713) 2023-01-10 17:22:32 -08:00