1
Fork 0
mirror of https://github.com/RGBCube/nu_scripts synced 2025-07-30 21:57:44 +00:00
nu_scripts/sourced/nu_101/nothing.nu
Igor e8df70a406
Port before_v0.60/fuzzy, before_v0.60/ls-mods and before_v0.60/nu_101 (#845)
This PR is part of porting all old scripts #221 and includes a set of
modules:

- fuzzy -> `modules/fuzzy/fuzzy_command_search.nu`
- ls-mods -> `modules/ls-mods`: `ls-less.nu`, `ls-wide.nu` and
`ls-wide-with-color.nu`
- nu_101 -> `modules/nu_101`: `nothing.nu` and `inner_outer_loop.nu`

Edit: `fuzzy` and `nu_101` have been moved to `sourced`
2024-05-26 12:35:59 -05:00

24 lines
364 B
Text

# This checks the -f switch to see if it was supplied
# and tests the new $nothing variable
def nada [
flat?
] {
if $flat == null {
true
} else {
false
}
}
# This shows an alternate way to check for nothing
def nada2 [
flat?
] {
let flat = ($flat | is-empty)
if $flat {
true
} else {
false
}
}