nushell/crates/nu-command/tests/commands
Ian Manske 33a7bc405f
Refactor drop columns to fix issues (#10903)
# Description
This PR refactors `drop columns` and fixes issues #10902 and #6846.
Tables with "holes" are now handled consistently, although still
somewhat awkwardly. That is, the columns in the first row are used to
determine which columns to drop, meaning that the columns displayed all
the way to the right by `table` may not be the columns actually being
dropped. For example, `[{a: 1}, {b: 2}] | drop column` will drop column
`a` instead of `b`. Before, this would give a list of empty records.

# User-Facing Changes
`drop columns` can now take records as input.
2023-11-09 13:51:46 +01:00
..
assignment Clean up tests containing unnecessary cwd: tokens (#9692) 2023-07-17 18:43:51 +02:00
conversions
date rename from date format to format date (#9902) 2023-08-04 06:06:00 +12:00
hash_ Clean up tests containing unnecessary cwd: tokens (#9692) 2023-07-17 18:43:51 +02:00
math Add long options for generators and math (#10752) 2023-10-19 18:17:42 +02:00
move_ Allow filesystem commands to access files with glob metachars in name (#10694) 2023-10-18 13:31:15 -05:00
network fix #10319: allow json request of value type list (#10356) 2023-09-13 16:54:03 +02:00
path Add long options for path (#10775) 2023-10-19 22:07:01 +02:00
platform Add long options for platform and random (#10776) 2023-10-19 22:04:33 +02:00
query Feature cleanup (#7182) 2022-11-22 16:58:11 -08:00
random Add long options for platform and random (#10776) 2023-10-19 22:04:33 +02:00
skip Fix 9156 endian consistency (#9873) 2023-08-24 07:08:58 -05:00
str_ use to_lowercase in str downcase (#10850) 2023-10-27 19:16:17 +02:00
take
url Add url decode command (#10611) 2023-10-05 18:43:58 +02:00
alias.rs
all.rs Removes unnecessary cwd and pipeline from various tests (#9202) 2023-05-17 18:55:26 -05:00
any.rs Removes unnecessary cwd and pipeline from various tests (#9202) 2023-05-17 18:55:26 -05:00
append.rs
break_.rs
cal.rs
cd.rs fix(nu-command/tests): further remove unnecessary pipeline() and cwd() (#8793) 2023-04-07 14:09:55 -07:00
compact.rs
config_env_default.rs Command: Add config env/nu --default to print defaults (#10480) 2023-09-25 08:00:59 -05:00
config_nu_default.rs Command: Add config env/nu --default to print defaults (#10480) 2023-09-25 08:00:59 -05:00
continue_.rs
cp.rs readd update flag to cp command (#10824) 2023-10-25 11:30:13 +02:00
debug_info.rs Make debug info lazy (#10728) 2023-10-24 12:48:05 -05:00
def.rs Add --env and --wrapped flags to def (#10566) 2023-10-02 21:13:31 +03:00
default.rs fix default after an empty where (#10240) 2023-09-06 16:39:35 +08:00
detect_columns.rs Use long options for string (#10777) 2023-10-19 22:08:09 +02:00
do_.rs remove the $nothing variable (#10478) 2023-09-26 18:49:28 +02:00
drop.rs Refactor drop columns to fix issues (#10903) 2023-11-09 13:51:46 +01:00
each.rs
echo.rs Change echo to print when not redirected (#10338) 2023-09-13 06:35:01 +12:00
empty.rs fix(nu-command/tests): further remove unnecessary pipeline() and cwd() (#8793) 2023-04-07 14:09:55 -07:00
error_make.rs Refactor error make (#10923) 2023-11-03 10:09:33 -05:00
every.rs
exec.rs
export_def.rs Removes unnecessary cwd and pipeline from various tests (#9202) 2023-05-17 18:55:26 -05:00
fill.rs Removes unnecessary cwd and pipeline from various tests (#9202) 2023-05-17 18:55:26 -05:00
find.rs
first.rs
flatten.rs
for_.rs Change echo to print when not redirected (#10338) 2023-09-13 06:35:01 +12:00
format.rs
generate.rs rename unfold to generate (#10770) 2023-10-19 09:30:34 -05:00
get.rs Fix: remove unnecessary r#"..."# (#8670) (#9764) 2023-07-21 17:32:37 +02:00
glob.rs fix clippy (#10659) 2023-10-10 03:31:15 +13:00
group_by.rs Allow empty list inputs in group-by and return empty record (#10730) 2023-10-19 12:20:52 +02:00
headers.rs Fix: remove unnecessary r#"..."# (#8670) (#9764) 2023-07-21 17:32:37 +02:00
help.rs Tests: clean up unnecessary use of pipeline() (#10170) 2023-08-31 23:10:29 +02:00
histogram.rs Fix: remove unnecessary r#"..."# (#8670) (#9764) 2023-07-21 17:32:37 +02:00
insert.rs allow values command to support LazyRecords (#10418) 2023-09-20 12:57:29 -05:00
inspect.rs
into_datetime.rs
into_filesize.rs Update internal use of decimal to float (#10333) 2023-09-13 23:53:55 +02:00
into_int.rs fix some new chrono warnings (#10384) 2023-09-15 15:46:25 -05:00
join.rs
last.rs
length.rs Spanned Value step 1: span all value cases (#10042) 2023-08-25 08:48:05 +12:00
let_.rs fix 'let' to properly redirect (#10360) 2023-09-14 10:18:29 +12:00
lines.rs
loop_.rs Change echo to print when not redirected (#10338) 2023-09-13 06:35:01 +12:00
ls.rs treat path contains '?' as pattern (#10142) 2023-09-03 19:25:00 -05:00
match_.rs Support pattern matching null literals (#10829) 2023-10-25 06:30:45 +08:00
merge.rs Fix: remove unnecessary r#"..."# (#8670) (#9764) 2023-07-21 17:32:37 +02:00
mkdir.rs
mod.rs Add exec command for Windows (#11001) 2023-11-08 14:50:25 -06:00
mut_.rs
nu_check.rs Use long options for string (#10777) 2023-10-19 22:08:09 +02:00
open.rs allow multiple extensions (#10593) 2023-10-13 13:45:36 -05:00
par_each.rs
parse.rs Clippy in tests (#10394) 2023-09-16 21:49:10 +02:00
prepend.rs Fix warnings and old names (#8457) 2023-03-15 18:54:55 +13:00
print.rs
range.rs Fix: remove unnecessary r#"..."# (#8670) (#9764) 2023-07-21 17:32:37 +02:00
redirection.rs redirection: fix internal commands error with o+e> redirection (#10816) 2023-10-25 16:35:51 +02:00
reduce.rs Add long options for filters (#10641) 2023-10-08 13:12:46 +02:00
reject.rs Disallow duplicated columns in table literals (#10875) 2023-11-01 21:25:35 +01:00
rename.rs Add long options for filters (#10641) 2023-10-08 13:12:46 +02:00
return_.rs allow early return outside of main (#10514) 2023-09-28 18:49:42 +02:00
reverse.rs
rm.rs Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
roll.rs Fix: remove unnecessary r#"..."# (#8670) (#9764) 2023-07-21 17:32:37 +02:00
rotate.rs Clean up tests containing unnecessary cwd: tokens (#9692) 2023-07-17 18:43:51 +02:00
run_external.rs Limit run-external --redirect-combine sh test to not(Windows) (#10905) 2023-11-07 16:35:24 +08:00
save.rs
select.rs Use long options for string (#10777) 2023-10-19 22:08:09 +02:00
semicolon.rs
seq_char.rs
seq.rs
sort_by.rs
sort.rs
source_env.rs
split_by.rs Update description and error types for split-by (#10865) 2023-11-07 16:27:10 +01:00
split_column.rs Use long options for string (#10777) 2023-10-19 22:08:09 +02:00
split_row.rs Simplify rawstrings in tests (#10180) 2023-09-01 00:08:27 +02:00
table.rs nu-table: Fix failing test (relied on termwidth assumptions) (#10492) 2023-09-25 18:17:42 +02:00
to_text.rs Make to text stream ListStreams (#7577) 2022-12-22 16:38:07 -08:00
touch.rs
transpose.rs
try_.rs
ucp.rs Allow filesystem commands to access files with glob metachars in name (#10694) 2023-10-18 13:31:15 -05:00
umkdir.rs Add umkdir command (#10785) 2023-10-30 07:59:48 -05:00
unfold.rs add unfold back with a deprecation warning (#10771) 2023-10-19 19:23:06 +02:00
uniq_by.rs
uniq.rs Add long options for filters (#10641) 2023-10-08 13:12:46 +02:00
update.rs
upsert.rs
use_.rs Add --env and --wrapped flags to def (#10566) 2023-10-02 21:13:31 +03:00
where_.rs
which.rs change the output of which to be more explicit (#9646) 2023-07-20 19:10:53 -05:00
while_.rs Change echo to print when not redirected (#10338) 2023-09-13 06:35:01 +12:00
with_env.rs
wrap.rs Fix: remove unnecessary r#"..."# (#8670) (#9764) 2023-07-21 17:32:37 +02:00
zip.rs Fix: remove unnecessary r#"..."# (#8670) (#9764) 2023-07-21 17:32:37 +02:00