nushell/crates/nu-command/src
pwygab 8c7e2dbdf9
make parse -r columns return 0-indexed uncapitalised (#7897)
# Description

Fixes #7886.

```
/home/gabriel/CodingProjects/nushell〉'A|B|C' | parse -r '(\w)\|(\w)\|(\w)'                                                                                             01/29/2023 01:08:29 PM
╭───┬──────────┬──────────┬──────────╮
│ # │ capture0 │ capture1 │ capture2 │
├───┼──────────┼──────────┼──────────┤
│ 0 │ A        │ B        │ C        │
╰───┴──────────┴──────────┴──────────╯
```

# User-Facing Changes
Columns automatically named by `parse -r` are now 0-indexec and
uncapitalised.

# 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 -A
clippy::needless_collect` to check that you're using the standard code
style
- `cargo test --workspace` to check that all tests pass

# 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.
2023-01-29 07:34:34 -06:00
..
bits with the release of rust 1.67, let's bump to 1.66.1 (#7866) 2023-01-26 15:31:17 -06:00
bytes Add Github Actions workflow to check for typos (#7892) 2023-01-29 10:22:56 +13:00
charting Reduce again the number of match calls (#7815) 2023-01-24 12:23:42 +01:00
conversions Reduce again the number of match calls (#7815) 2023-01-24 12:23:42 +01:00
core_commands make help commands search term don't generate $nothing (#7896) 2023-01-28 18:57:26 -06:00
database Reduce again the number of match calls (#7815) 2023-01-24 12:23:42 +01:00
dataframe with the release of rust 1.67, let's bump to 1.66.1 (#7866) 2023-01-26 15:31:17 -06:00
date Add extra_usage messages for subcommand-only commands (#7594) 2022-12-24 07:16:29 -06:00
deprecated fetch -> http get and post -> http post (#7796) 2023-01-20 10:38:30 -08:00
env Fix an example of env command (#7603) 2022-12-26 16:40:34 +08:00
experimental Change instances of Value::string("foo", Span::test_data()) to Value::test_string("foo") (#7592) 2022-12-24 10:25:38 +01:00
filesystem Name threads (#7879) 2023-01-28 21:40:52 +01:00
filters Add Github Actions workflow to check for typos (#7892) 2023-01-29 10:22:56 +13:00
formats To csv fix (#7850) 2023-01-25 08:42:53 -06:00
generators Further cleanup of Span::test_data usage + span fixes (#7595) 2022-12-24 07:41:57 -06:00
hash Add extra_usage messages for subcommand-only commands (#7594) 2022-12-24 07:16:29 -06:00
math Fix typos and use more idiomatic assertions (#7755) 2023-01-15 15:03:32 +13:00
misc Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
network Add Github Actions workflow to check for typos (#7892) 2023-01-29 10:22:56 +13:00
path spanned error on path exists command (#7717) 2023-01-12 06:56:39 -06:00
platform refactor: use input_handler::operate in ansi_strip command (#7888) 2023-01-28 08:11:21 -06:00
random Add search terms in random and expression categories (#7736) 2023-01-12 14:01:40 +01:00
shells Add more input/output type annotations (#7532) 2022-12-21 20:20:46 +01:00
strings make parse -r columns return 0-indexed uncapitalised (#7897) 2023-01-29 07:34:34 -06:00
system mention do in complete command's doc (#7884) 2023-01-28 16:42:05 -06:00
viewers with the release of rust 1.67, let's bump to 1.66.1 (#7866) 2023-01-26 15:31:17 -06:00
default_context.rs Add 'number' command for enumeration (#7871) 2023-01-28 06:45:57 +13:00
example_test.rs Reduce again the number of match calls (#7815) 2023-01-24 12:23:42 +01:00
input_handler.rs Standardise the use of ShellError::UnsupportedInput and ShellError::TypeMismatch and add spans to every instance of the former (#7217) 2022-12-23 01:48:53 -05:00
lib.rs Progress bar Implementation (#7661) 2023-01-10 20:57:48 -05:00
progress_bar.rs Reduce again the number of match calls (#7815) 2023-01-24 12:23:42 +01:00
sort_utils.rs Reduce again the number of match calls (#7815) 2023-01-24 12:23:42 +01:00