mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 07:55:59 +02:00
refactor(get,select,reject)!: deprecate --ignore-errors in favor of --optional (#16007)
# Description As decided on the team meeting on 2025-06-19, rename `--ignore-errors (-i)` to `--optional (-o)` with a (currently) indefinite grace period. After `--ignore-errors (-i)` is removed, the short flag `-i` can be used for `--ignore-case` (not implemented as of this PR) # User-Facing Changes `get`/`select`/`reject`: rename `--ignore-errors (-i)` to `--optional (-o)` to better reflect its behavior. # Tests + Formatting - 🟢 toolkit fmt - 🟢 toolkit clippy - 🟢 toolkit test - 🟢 toolkit test stdlib # After Submitting Update docs and inform third parties that integrate with nushell. --------- Co-authored-by: Bahex <17417311+Bahex@users.noreply.github.com>
This commit is contained in:
@ -42,7 +42,7 @@ def get-annotated [
|
||||
| from nuon
|
||||
| each {|e|
|
||||
# filter commands with test attributes, and map attributes to annotation name
|
||||
let test_attributes = $e.attributes.name | each {|x| $valid_annotations | get -i $x }
|
||||
let test_attributes = $e.attributes.name | each {|x| $valid_annotations | get -o $x }
|
||||
if ($test_attributes | is-not-empty) {
|
||||
$e | update attributes $test_attributes.0
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ def run [
|
||||
} else {
|
||||
^$nu.current-exe --no-config-file --commands $'use std; use std/log; NU_LOG_LEVEL=($system_level) log ($message_level) "test message"'
|
||||
}
|
||||
| complete | get --ignore-errors stderr
|
||||
| complete | get --optional stderr
|
||||
}
|
||||
|
||||
def "assert no message" [
|
||||
|
@ -19,7 +19,7 @@ def run-command [
|
||||
} else {
|
||||
^$nu.current-exe --no-config-file --commands $'use std/log; NU_LOG_LEVEL=($system_level) log custom "($message)" "($format)" ($log_level) --level-prefix "($level_prefix)" --ansi "($ansi)"'
|
||||
}
|
||||
| complete | get --ignore-errors stderr
|
||||
| complete | get --optional stderr
|
||||
}
|
||||
|
||||
@test
|
||||
|
@ -16,7 +16,7 @@ def run-command [
|
||||
} else {
|
||||
^$nu.current-exe --no-config-file --commands $'use std; use std/log; NU_LOG_LEVEL=($system_level) log ($message_level) --format "($format)" "($message)"'
|
||||
}
|
||||
| complete | get --ignore-errors stderr
|
||||
| complete | get --optional stderr
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user