forked from extern/nushell
Rename all?
, any?
and empty?
(#6464)
Rename `all?`, `any?` and `empty?` to `all`, `any` and `is-empty` for sake of simplicity and consistency. - More understandable for newcomers, that these commands are no special to others. - `?` syntax did not really aprove readability. For me it made it worse. - We can reserve `?` syntax for any other nushell feature.
This commit is contained in:
@ -191,7 +191,7 @@ fn run_custom_command_with_flag() {
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
r#"
|
||||
def foo [--bar:number] { if ($bar | empty?) { echo "empty" } else { echo $bar } }; foo --bar 10
|
||||
def foo [--bar:number] { if ($bar | is-empty) { echo "empty" } else { echo $bar } }; foo --bar 10
|
||||
"#
|
||||
);
|
||||
|
||||
@ -203,7 +203,7 @@ fn run_custom_command_with_flag_missing() {
|
||||
let actual = nu!(
|
||||
cwd: ".",
|
||||
r#"
|
||||
def foo [--bar:number] { if ($bar | empty?) { echo "empty" } else { echo $bar } }; foo
|
||||
def foo [--bar:number] { if ($bar | is-empty) { echo "empty" } else { echo $bar } }; foo
|
||||
"#
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user