nushell/crates/nu-command/src
Stefan Holderbach 4b301710d3
Convert more examples and tests to record! macro (#10840)
# Description
Use `record!` macro instead of defining two separate `vec!` for `cols`
and `vals` when appropriate.
This visually aligns the key with the value.
Further more you don't have to deal with the construction of `Record {
cols, vals }` so we can hide the implementation details in the future.

## State

Not covering all possible commands yet, also some tests/examples are
better expressed by creating cols and vals separately.

# User/Developer-Facing Changes
The examples and tests should read more natural. No relevant functional
change

# Bycatch

Where I noticed it I replaced usage of `Value` constructors with
`Span::test_data()` or `Span::unknown()` to the `Value::test_...`
constructors. This should make things more readable and also simplify
changes to the `Span` system in the future.
2023-10-28 14:52:31 +02:00
..
bytes Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
charting Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
conversions Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
database Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
date Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
debug Make debug info lazy (#10728) 2023-10-24 12:48:05 -05:00
env Fix editor config for reedline and config nu/env (#10535) 2023-09-29 16:36:03 +02:00
experimental Add functions for each Value case (#9736) 2023-07-21 08:20:33 -05:00
filesystem deprecate glob --not in favor of glob --exclude (#10827) 2023-10-25 17:11:57 +02:00
filters Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
formats Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
generators add unfold back with a deprecation warning (#10771) 2023-10-19 19:23:06 +02:00
hash Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
help Add 'help escapes' command for quick reference of nushell string escapes (#10522) 2023-09-30 09:04:27 -05:00
math Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
misc Add long options for misc and network (#10753) 2023-10-19 18:16:44 +02:00
network Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
path Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
platform implement whoami using uutils (#10488) 2023-10-25 09:53:52 -05:00
random Add long options for platform and random (#10776) 2023-10-19 22:04:33 +02:00
removed Rename misused "deprecation" to removal (#10000) 2023-08-15 07:17:31 +12:00
shells Fix usage for the exit command. (#9450) 2023-06-16 10:09:02 +02:00
strings Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
system Improve registry value return types (#10806) 2023-10-23 07:21:27 -05:00
viewers Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
default_context.rs implement whoami using uutils (#10488) 2023-10-25 09:53:52 -05:00
example_test.rs feat: Add unfold command (#10489) 2023-09-30 09:08:06 -05:00
lib.rs Move eval_hook to nu-cmd-base (#10146) 2023-08-29 23:46:50 +02:00
progress_bar.rs cp progress bar implementation (#8012) 2023-02-22 11:57:38 -08:00
sort_utils.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00