Rename/deprecate range to slice (#14825)

# Description
As the `range` command has an ambiguous name (does it construct a range
type?, does it iterate a range like `seq`) replace it with a more
descriptive verb of what it does: `slice`

Closes #14130
# User-Facing Changes
`range` is now deprecated and replaced in whole by `slice` with the same
behavior.
`range` will be removed in `0.103.0`

# Tests + Formatting
Tests have been updated to use `slice`

# After submitting

- [ ] prepare PR for `nu_scripts` (several usages of `range` to be
fixed)
- [ ] update documentation usages of `range` after release
This commit is contained in:
Stefan Holderbach
2025-01-17 13:21:32 +01:00
committed by GitHub
parent 089c5221cc
commit 4dcaf2a201
7 changed files with 167 additions and 74 deletions

View File

@ -82,7 +82,6 @@ mod print;
#[cfg(feature = "sqlite")]
mod query;
mod random;
mod range;
mod redirection;
mod reduce;
mod reject;
@ -100,6 +99,7 @@ mod seq;
mod seq_char;
mod seq_date;
mod skip;
mod slice;
mod sort;
mod sort_by;
mod source_env;