nushell/crates/nu-command/tests
Ian Manske 1038c64f80
Add sys subcommands (#12747)
# Description
Adds subcommands to `sys` corresponding to each column of the record
returned by `sys`. This is to alleviate the fact that `sys` now returns
a regular record, meaning that it must compute every column which might
take a noticeable amount of time. The subcommands, on the other hand,
only need to compute and return a subset of the data which should be
much faster. In fact, it should be as fast as before, since this is how
the lazy record worked (it would compute only each column as necessary).

I choose to add subcommands instead of having an optional cell-path
parameter on `sys`, since the cell-path parameter would:
- increase the code complexity (can access any value at any row or
nested column)
- prevents discovery with tab-completion
- hinders type checking and allows users to pass potentially invalid
columns

# User-Facing Changes
Deprecates `sys` in favor of the new `sys` subcommands.
2024-05-06 23:20:27 +00:00
..
commands Add sys subcommands (#12747) 2024-05-06 23:20:27 +00:00
format_conversions Avoid taking unnecessary ownership of intermediates (#12740) 2024-05-04 00:53:15 +00:00
main.rs ♻️ rework some help strings (#12306) 2024-03-27 08:41:02 -05:00