nushell/crates/nu-command/src
Darren Schroeder 64f34e0287
allow math avg to work with durations (#11598)
# Description

I ran into a problem where one of our benchmark tests in nu_scripts
wouldn't work because math avg wouldn't work with durations, so I made
these changes to support it. I'm confident that there are other math
commands that probably need this "fix".

Side note - we should really fix our inout_output_type system.

# User-Facing Changes
<!-- List of all changes that impact the user experience here. This
helps us keep track of breaking changes. -->

# Tests + Formatting
<!--
Don't forget to add tests that cover your changes.

Make sure you've run and fixed any issues with these commands:

- `cargo fmt --all -- --check` to check standard code formatting (`cargo
fmt --all` applies these changes)
- `cargo clippy --workspace -- -D warnings -D clippy::unwrap_used` to
check that you're using the standard code style
- `cargo test --workspace` to check that all tests pass (on Windows make
sure to [enable developer
mode](https://learn.microsoft.com/en-us/windows/apps/get-started/developer-mode-features-and-debugging))
- `cargo run -- -c "use std testing; testing run-tests --path
crates/nu-std"` to run the tests for the standard library

> **Note**
> from `nushell` you can also use the `toolkit` as follows
> ```bash
> use toolkit.nu # or use an `env_change` hook to activate it
automatically
> toolkit check pr
> ```
-->

# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-01-21 08:41:23 -06:00
..
bytes adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
charting Construct Records only through checked helpers (#11386) 2023-12-21 16:48:15 +01:00
conversions adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
database Fix memory consumption of into sqlite (#10232) 2024-01-15 21:41:25 -06:00
date Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
debug adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
env adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
experimental Bump windows from 0.48.0 to 0.52.0 (#11325) 2023-12-21 18:49:15 +01:00
filesystem Send only absolute paths to uu_mv (#11576) 2024-01-19 05:34:18 -06:00
filters fix: items doesn't support lazy records (#11567) 2024-01-18 07:57:21 -06:00
formats update deps calamine and quick-xml (#11582) 2024-01-19 12:23:51 -06:00
generators Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
hash adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
help adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
math allow math avg to work with durations (#11598) 2024-01-21 08:41:23 -06:00
misc Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
network Fix incorrect handling of boolean flags for builtin commands (#11492) 2024-01-11 17:19:48 +02:00
path check existance w/o traversing symlinks (#10872) 2024-01-14 07:33:33 +08:00
platform adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
random Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
removed Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
shells Enforce required, optional, and rest positional arguments start with an uppercase and end with a period. (#11285) 2023-12-15 14:32:37 +08:00
stor Simplify the feature gates for stor commands (#11416) 2023-12-24 13:31:46 +01:00
strings adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
system Do not block signals for child processes (#11402) 2024-01-15 16:08:21 -06:00
viewers adjust some commansd input_output type (#11436) 2024-01-15 16:58:26 +08:00
default_context.rs Initial implementation of umv from uutils (#10822) 2024-01-18 10:20:57 -06:00
example_test.rs feat: Add unfold command (#10489) 2023-09-30 09:08:06 -05:00
lib.rs Simplify the feature gates for stor commands (#11416) 2023-12-24 13:31:46 +01:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Convert Shellerror::GenericError to named fields (#11230) 2023-12-07 00:40:03 +01:00