1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-08-01 22:57:46 +00:00

Replace use of $nothing with null (#621)

`$nothing` will be deprecated in nu 0.86

This accompanies
- https://github.com/nushell/nushell/pull/10478
This commit is contained in:
Stefan Holderbach 2023-09-26 18:52:49 +02:00 committed by GitHub
parent 9ceac61989
commit 6947014306
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 40 additions and 40 deletions

View file

@ -19,7 +19,7 @@ export-env {
def default-hooks [] {
(if ($env.config.hooks.env_change.PWD != $nothing) {
(if ($env.config.hooks.env_change.PWD != null) {
[$env.config.hooks.env_change.PWD]
}
else {

View file

@ -29,7 +29,7 @@ export def "path check-sub" [
(ls -a $folder
| where (
($type == $nothing or $it.type in $type)
($type == null or $it.type in $type)
and ($it.name | path basename) == $subfolder
)
| length
@ -53,7 +53,7 @@ export def "path find-sub" [
)
);
if ($paths != $nothing) and ($paths | length) > 0 {
if ($paths != null) and ($paths | length) > 0 {
[ ($paths | first), $subfolder ] | path join
} else {[]}
}

View file

@ -65,7 +65,7 @@ export def-env activate [
PROMPT_COMMAND: $new_prompt
}
} else {
$new_env | merge { CONDA_OLD_PROMPT_COMMAND: $nothing }
$new_env | merge { CONDA_OLD_PROMPT_COMMAND: null }
}
@ -84,7 +84,7 @@ export def-env deactivate [] {
hide-env CONDA_OLD_PATH
$env.PROMPT_COMMAND = (
if $env.CONDA_OLD_PROMPT_COMMAND == $nothing {
if $env.CONDA_OLD_PROMPT_COMMAND == null {
$env.PROMPT_COMMAND
} else {
$env.CONDA_OLD_PROMPT_COMMAND