nushell/crates/nu-command/tests/commands
Antoine Stevan 6c026242d4
remove the $nothing variable (#10478)
related to 
- https://github.com/nushell/nushell/pull/9973
- https://github.com/nushell/nushell/pull/9918

thanks to @jntrnr and their super useful tips on this PR, i learned
about the parser + evaluation, so 🙏

# Description
because we already have `null` as the value of the type `nothing` and as
a followup to the two other attempts of mine, i propose to remove the
redundant `$nothing` built-in variable 😋

this PR is the first step, deprecating `$nothing`.
a followup PR will remove it altogether and wait for 0.87 👍 

⚙️ **details**: a new `NOTHING_VARIABLE_ID = 3` has been added,
parsing `$nothing` will create it, finally a `Value::Nothing` will be
produced and a warning will be reported.

this PR already fixes the `toolkit.nu` module so that it does not throw
a bunch of warnings each time 👌

# User-Facing Changes
`$nothing` is now deprecated and will be removed in 0.87
```nushell
> $nothing
Error:   × Deprecated variable
   ╭─[entry #1:1:1]
 1 │ $nothing
   · ────┬───
   ·     ╰── `$nothing` is deprecated and will be removed in 0.87.
   ╰────
  help: Use `null` instead
```

# Tests + Formatting
tests have been updated, especially
- `nothing_fails_string`
- `nothing_fails_int`
which use a variable called `nil` now to make sure `nothing` does not
support cell paths 👍

# After Submitting
classic deprecation mention 👍
2023-09-26 18:49:28 +02:00
..
assignment
conversions
date rename from date format to format date (#9902) 2023-08-04 06:06:00 +12:00
hash_
math Update internal use of decimal to float (#10333) 2023-09-13 23:53:55 +02:00
move_
network fix #10319: allow json request of value type list (#10356) 2023-09-13 16:54:03 +02:00
path
platform
query
random Rename random decimal to random float (#10320) 2023-09-12 13:03:05 +02:00
skip
str_ Update internal use of decimal to float (#10333) 2023-09-13 23:53:55 +02:00
take
url
alias.rs
all.rs
any.rs
append.rs
break_.rs
cal.rs
cd.rs
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 show the full directory / file path in "directory not found" error (#10430) 2023-09-26 17:38:58 +08:00
def.rs differentiating between --x and --x: bool (#10456) 2023-09-23 10:20:48 +02:00
default.rs
detect_columns.rs
do_.rs remove the $nothing variable (#10478) 2023-09-26 18:49:28 +02:00
drop.rs
each.rs
echo.rs Change echo to print when not redirected (#10338) 2023-09-13 06:35:01 +12:00
empty.rs
error_make.rs
every.rs
exec.rs
export_def.rs
fill.rs
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
get.rs
glob.rs
group_by.rs
headers.rs
help.rs
histogram.rs
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
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
match_.rs
merge.rs
mkdir.rs
mod.rs Command: Add config env/nu --default to print defaults (#10480) 2023-09-25 08:00:59 -05:00
mut_.rs
nu_check.rs
open.rs Map DirectoryNotFound to FileNotFound for open command (#10089) 2023-09-21 20:17:44 +02:00
par_each.rs
parse.rs Clippy in tests (#10394) 2023-09-16 21:49:10 +02:00
prepend.rs
print.rs
range.rs
redirection.rs
reduce.rs
reject.rs update reject to be able to recive arg list (#10216) 2023-09-09 15:01:25 -05:00
rename.rs
return_.rs
reverse.rs
rm.rs Deref &String arguments to &str where appropriate (#10321) 2023-09-12 14:06:56 +08:00
roll.rs
rotate.rs
run_external.rs
save.rs
select.rs Remove select error if same row/column is provided (#10350) 2023-09-13 13:49:55 +02:00
semicolon.rs
seq_char.rs
seq.rs
sort_by.rs
sort.rs
source_env.rs
split_by.rs
split_column.rs
split_row.rs
table.rs nu-table: Fix failing test (relied on termwidth assumptions) (#10492) 2023-09-25 18:17:42 +02:00
to_text.rs
touch.rs
transpose.rs
try_.rs
ucp.rs Fix variables not allowed in ucp (#10304) 2023-09-10 17:54:33 -05:00
uniq_by.rs
uniq.rs
update.rs
upsert.rs
use_.rs
where_.rs
which.rs
while_.rs Change echo to print when not redirected (#10338) 2023-09-13 06:35:01 +12:00
with_env.rs
wrap.rs
zip.rs