nushell/crates/nu-command/src
Nano eca9f461da
Make append/prepend consistent for ranges (#10231)
# Description
This PR makes `append`/`prepend` more consistent, in particular, it allows you to
work with ranges. Previously, you couldn't append a list by range:
```nu
> 0..1 | append 2..4
╭──────╮
│    0 │
│    1 │
│ 2..4 │
╰──────╯
```

Now it works:
```nu
> 0..1 | append 2..4
╭───╮
│ 0 │
│ 1 │
│ 2 │
│ 3 │
│ 4 │
╰───╯
```

# User-Facing Changes
If someone needs the old behavior, then it can be obtained like this:
```nu
> 0..1 | append [2..4]
╭──────╮
│    0 │
│    1 │
│ 2..4 │
╰──────╯
```
2023-09-05 01:47:51 +02:00
..
bytes Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
charting Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
conversions Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
database Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
date Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
debug Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
env Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
experimental Add functions for each Value case (#9736) 2023-07-21 08:20:33 -05:00
filesystem Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
filters Make append/prepend consistent for ranges (#10231) 2023-09-05 01:47:51 +02:00
formats Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
generators Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
hash Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
help Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
math Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
misc REFACTOR: move source out of deprecated commands (#9060) 2023-05-04 00:02:03 +02:00
network Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
path Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
platform Update crossterm/ratatui/dev-reedline (#10137) 2023-09-03 19:22:25 -05:00
random Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
removed Rename misused "deprecation" to removal (#10000) 2023-08-15 07:17:31 +12:00
shells Fix usage for the exit command. (#9450) 2023-06-16 10:09:02 +02:00
strings Auto format let-else block (#10214) 2023-09-04 19:42:31 +12:00
system Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
viewers Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
default_context.rs move 'bytes' back to commands (#10051) 2023-08-19 22:43:53 +02:00
example_test.rs enable/update some example tests so they work again (#10058) 2023-08-19 09:06:59 -05:00
lib.rs Move eval_hook to nu-cmd-base (#10146) 2023-08-29 23:46:50 +02:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00