mirror of
https://github.com/RGBCube/nu_scripts
synced 2025-07-30 21:57:44 +00:00

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`
24 lines
364 B
Text
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
|
|
}
|
|
}
|