nushell/crates/nu-command/src/filesystem
Stefan Holderbach 438062d7fc
Document and critically review ShellError variants - Ep. 1 (#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.

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

- Name fields on `ShellError::OperatorOverflow`
- Name fields on `ShellError::PipelineMismatch`
- Add doc to `ShellError::OnlySupportsThisInputType`
- Name `ShellError::OnlySupportsThisInputType`
- Name field on `ShellError::PipelineEmpty`
- Comment about issues with `TypeMismatch*`
- Fix a few `exp_input_type`s
- Name fields on `ShellError::InvalidRange`

# User-Facing Changes

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

# Tests + Formatting

(No additional tests needed so far)
2023-03-01 20:34:48 +01:00
..
cd_query.rs Fix typos by codespell (#7600) 2022-12-26 02:31:26 -05:00
cd.rs #8027 Hide implementation details in invalid cd call (#8049) 2023-02-13 02:24:48 +00:00
cp.rs Ctrl+c interruption - cp command (#8219) 2023-02-26 12:18:20 -08:00
glob.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
ls.rs Benchmark each pipeline element (#7854) 2023-02-11 21:35:48 +00:00
mkdir.rs Filesystem commands print --verbose to stderr (#8014) 2023-02-09 10:29:34 -08:00
mod.rs move BufferedReader out of nu-command (#7697) 2023-01-06 15:22:17 -08:00
mv.rs Filesystem commands print --verbose to stderr (#8014) 2023-02-09 10:29:34 -08:00
open.rs Use imported names in Command::run signatures (#7967) 2023-02-05 22:17:46 +01:00
rm.rs Filesystem commands print --verbose to stderr (#8014) 2023-02-09 10:29:34 -08:00
save.rs Document and critically review ShellError variants - Ep. 1 (#8229) 2023-03-01 20:34:48 +01:00
start.rs Support URLs in start command (#7799) 2023-02-16 13:33:25 +00:00
touch.rs Use variable names directly in the format strings (#7906) 2023-01-29 19:37:54 -06:00
util.rs move BufferedReader out of nu-command (#7697) 2023-01-06 15:22:17 -08:00
watch.rs Dependency update: update notify version to v5 (#8114) 2023-02-22 13:35:09 -08:00