mirror of
https://github.com/nushell/nushell.git
synced 2025-08-10 00:48:59 +02:00
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:
committed by
GitHub
parent
089c5221cc
commit
4dcaf2a201
@ -441,7 +441,7 @@ fn better_operator_spans() -> TestResult {
|
||||
|
||||
#[test]
|
||||
fn range_right_exclusive() -> TestResult {
|
||||
run_test(r#"[1, 4, 5, 8, 9] | range 1..<3 | math sum"#, "9")
|
||||
run_test(r#"[1, 4, 5, 8, 9] | slice 1..<3 | math sum"#, "9")
|
||||
}
|
||||
|
||||
/// Issue #7872
|
||||
|
Reference in New Issue
Block a user