nushell/crates/nu-command/tests/commands
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
..
assignment ++= appendAssign operator (#7346) (#7354) 2022-12-09 11:20:58 -05:00
date 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
hash_
math Remove math eval command (#7284) 2023-01-04 23:50:18 +01:00
move_
network Fix typos and use more idiomatic assertions (#7755) 2023-01-15 15:03:32 +13:00
path
platform
query
random
skip last, skip, drop, take until, take while, skip until, skip while, where, reverse, shuffle, append, prepend and sort-by raise error when given non-lists (#7623) 2022-12-31 13:35:12 +02:00
str_ Remove math eval command (#7284) 2023-01-04 23:50:18 +01:00
take last, skip, drop, take until, take while, skip until, skip while, where, reverse, shuffle, append, prepend and sort-by raise error when given non-lists (#7623) 2022-12-31 13:35:12 +02:00
url Feat/7725 url join (#7823) 2023-01-22 19:49:40 +01:00
alias.rs Expand Nushell's help system (#7611) 2022-12-30 17:44:37 +02:00
all.rs Replace row conditions with closures in commands (#7428) 2022-12-10 19:24:06 +02:00
any.rs Replace row conditions with closures in commands (#7428) 2022-12-10 19:24:06 +02:00
append.rs revert changes on prepend and append (#7660) 2023-01-02 17:09:55 -08:00
break_.rs
cal.rs return Error if get meet nothing and without "i" (#7002) 2022-12-31 13:27:09 +02:00
cd.rs Re-enable some good tests, remove some bad tests (#7875) 2023-01-28 14:56:47 -06:00
compact.rs
continue_.rs
cp.rs
def.rs def: make various punctuation misuses into errors (#7624) 2022-12-31 13:18:53 +02:00
default.rs Make get hole errors and cell path hole errors identical (improvement on #7002) (#7647) 2023-01-02 14:45:43 -08:00
do_.rs Fix pipeline stall in do during capture and remove excessive redirections (#7204) 2023-01-25 00:24:38 -05:00
drop.rs last, skip, drop, take until, take while, skip until, skip while, where, reverse, shuffle, append, prepend and sort-by raise error when given non-lists (#7623) 2022-12-31 13:35:12 +02:00
each.rs
echo.rs
empty.rs
enter.rs
error_make.rs
every.rs
exec.rs Add "fall-through" signatures (#7527) 2022-12-22 00:33:26 +02:00
export_def.rs
find.rs let find take linebreaks into account in Value::String (#7789) 2023-01-20 00:07:34 +01:00
first.rs Make stream info visible to users in describe (#7589) 2023-01-03 21:08:05 -08:00
flatten.rs
for_.rs Fix typos and use more idiomatic assertions (#7755) 2023-01-15 15:03:32 +13:00
format.rs prevent panic with format command (#7522) 2022-12-19 13:10:02 +01:00
g.rs
get.rs Make get hole errors and cell path hole errors identical (improvement on #7002) (#7647) 2023-01-02 14:45:43 -08:00
glob.rs Expose filtering by file type in glob (#7834) 2023-01-28 07:50:12 -06:00
group_by.rs
headers.rs
help.rs Allow main command to define top-level module command (#7764) 2023-01-22 21:34:15 +02:00
histogram.rs
insert.rs
into_filesize.rs
into_int.rs
last.rs Make stream info visible to users in describe (#7589) 2023-01-03 21:08:05 -08:00
length.rs
let_.rs
lines.rs Replace row conditions with closures in commands (#7428) 2022-12-10 19:24:06 +02:00
loop_.rs Fix typos and use more idiomatic assertions (#7755) 2023-01-15 15:03:32 +13:00
ls.rs Fix typos and use more idiomatic assertions (#7755) 2023-01-15 15:03:32 +13:00
merge.rs
mkdir.rs mkdir change flag -s to -v (#7462) 2022-12-13 11:56:44 -05:00
mod.rs Make to text stream ListStreams (#7577) 2022-12-22 16:38:07 -08:00
mut_.rs
n.rs
nu_check.rs
open.rs Make get hole errors and cell path hole errors identical (improvement on #7002) (#7647) 2023-01-02 14:45:43 -08:00
p.rs
parse.rs make parse -r columns return 0-indexed uncapitalised (#7897) 2023-01-29 07:34:34 -06:00
prepend.rs revert changes on prepend and append (#7660) 2023-01-02 17:09:55 -08:00
print.rs
range.rs
redirection.rs Fix multi-line redirection inside a block (#7808) 2023-01-23 06:32:56 +13:00
reduce.rs Remove math eval command (#7284) 2023-01-04 23:50:18 +01:00
reject.rs Re-enable some good tests, remove some bad tests (#7875) 2023-01-28 14:56:47 -06:00
rename.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
return_.rs
reverse.rs last, skip, drop, take until, take while, skip until, skip while, where, reverse, shuffle, append, prepend and sort-by raise error when given non-lists (#7623) 2022-12-31 13:35:12 +02:00
rm.rs
roll.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
rotate.rs
run_external.rs Trim quotes when shelling out to cmd.exe (#7740) 2023-01-13 11:00:30 -08:00
save.rs Fix pipeline stall in do during capture and remove excessive redirections (#7204) 2023-01-25 00:24:38 -05:00
select.rs Make get hole errors and cell path hole errors identical (improvement on #7002) (#7647) 2023-01-02 14:45:43 -08:00
semicolon.rs
seq_char.rs Simplify seq char (#7054) 2022-11-09 17:06:47 -08:00
seq.rs Make stream info visible to users in describe (#7589) 2023-01-03 21:08:05 -08:00
shells.rs
sort_by.rs last, skip, drop, take until, take while, skip until, skip while, where, reverse, shuffle, append, prepend and sort-by raise error when given non-lists (#7623) 2022-12-31 13:35:12 +02:00
sort.rs
source_env.rs Initial support for parse-time constants (#7436) 2022-12-22 00:21:03 +02:00
split_by.rs
split_column.rs
split_row.rs
table.rs nu-commands/table (table -e) Recognize limited space better (#7861) 2023-01-26 14:06:17 -06:00
to_text.rs Make to text stream ListStreams (#7577) 2022-12-22 16:38:07 -08:00
touch.rs
transpose.rs
try_.rs fix some typos (#7773) 2023-01-16 12:43:46 +01:00
uniq_by.rs
uniq.rs
update.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
upsert.rs Improve empty pipelines (#7383) 2022-12-08 07:31:57 +13:00
use_.rs Allow main command to define top-level module command (#7764) 2023-01-22 21:34:15 +02:00
where_.rs nu-commands/table (table -e) Recognize limited space better (#7861) 2023-01-26 14:06:17 -06:00
which.rs
while_.rs Fix typos and use more idiomatic assertions (#7755) 2023-01-15 15:03:32 +13:00
with_env.rs Re-enable some good tests, remove some bad tests (#7875) 2023-01-28 14:56:47 -06:00
wrap.rs
zip.rs Better errors when bash-like operators are used (#7241) 2022-12-08 12:02:11 +13:00