nushell/crates/nu-command/src/conversions/into
Darren Schroeder 4fe7865ad0
allow --group-digits to be used in into string (#15265)
# Description

This PR allows the `into string` command to pass the `--group-digits`
flag which already existed in this code but was hard coded to `false`.

Now you can do things like
```nushell
❯ 1234567890 | into string --group-digits
1,234,567,890
❯ ls | into string size --group-digits | last 5
╭─#─┬────────name─────────┬─type─┬──size──┬───modified───╮
│ 0 │ README.md           │ file │ 12,606 │ 4 weeks ago  │
│ 1 │ rust-toolchain.toml │ file │ 1,125  │ 2 weeks ago  │
│ 2 │ SECURITY.md         │ file │ 2,712  │ 7 months ago │
│ 3 │ toolkit.nu          │ file │ 21,929 │ 2 months ago │
│ 4 │ typos.toml          │ file │ 542    │ 7 months ago │
╰─#─┴────────name─────────┴─type─┴──size──┴───modified───╯
❯ "12345" | into string --group-digits
12,345
```
# 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 toolkit.nu; toolkit test stdlib"` 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.
-->
2025-03-07 12:43:35 -06:00
..
binary.rs Remove pub on some command internals (#14636) 2024-12-19 19:42:18 +01:00
bool.rs Use Value::coerce_bool in into bool (#14731) 2025-01-03 08:11:34 -06:00
cell_path.rs into cell-path: noop when input is cell-path (#14881) 2025-01-21 11:11:40 -05:00
command.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
datetime.rs Run-time pipeline input typechecking tweaks (#14922) 2025-02-02 15:51:47 -05:00
duration.rs Fix an integer overflow bug in into duration (#15031) 2025-02-06 21:32:42 +01:00
filesize.rs Remove pub on some command internals (#14636) 2024-12-19 19:42:18 +01:00
float.rs Change the usage misnomer to "description" (#13598) 2024-08-22 12:02:08 +02:00
glob.rs into glob: noop when input is glob (#14882) 2025-01-21 10:50:53 -05:00
int.rs Add Filesize type (#14369) 2024-11-29 21:24:17 +00:00
mod.rs open, rm, umv, cp, rm and du: Don't globs if inputs are variables or string interpolation (#11886) 2024-02-23 09:17:09 +08:00
record.rs Deprecate date to-record and date to-table (#14319) 2024-11-29 23:06:26 +01:00
string.rs allow --group-digits to be used in into string (#15265) 2025-03-07 12:43:35 -06:00
value.rs replace regex crate with fancy_regex (#14646) 2025-01-01 17:37:50 -06:00