2023-01-26 21:06:17 +01:00
|
|
|
|
use nu_test_support::fs::Stub::FileWithContent;
|
|
|
|
|
use nu_test_support::playground::Playground;
|
2023-02-16 20:32:07 +01:00
|
|
|
|
use nu_test_support::{nu, nu_repl_code, pipeline};
|
2022-10-03 18:40:16 +02:00
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_0() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!("[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80");
|
2022-10-03 18:40:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───┬───┬────────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┼────────────────┤\
|
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ [list 3 items] │\
|
|
|
|
|
╰───┴───┴───┴────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_0() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!("[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse");
|
2022-10-03 18:40:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
2023-02-16 20:32:07 +01:00
|
|
|
|
"╭───┬───┬───╮\
|
|
|
|
|
│ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 1 │ 2 │ 3 │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 4 │ 5 │ 1 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 2 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 3 │\
|
|
|
|
|
╰───┴───┴───╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_basic() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: basic }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"+---+---+---+\
|
|
|
|
|
| a | b | c |\
|
|
|
|
|
+---+---+---+\
|
|
|
|
|
| 1 | 2 | 3 |\
|
|
|
|
|
+---+---+---+\
|
|
|
|
|
| 4 | 5 | 1 |\
|
|
|
|
|
| | +---+\
|
|
|
|
|
| | | 2 |\
|
|
|
|
|
| | +---+\
|
|
|
|
|
| | | 3 |\
|
|
|
|
|
+---+---+---+"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_heavy() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: heavy }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"┏━━━┳━━━┳━━━┓\
|
|
|
|
|
┃ a ┃ b ┃ c ┃\
|
|
|
|
|
┣━━━╋━━━╋━━━┫\
|
|
|
|
|
┃ 1 ┃ 2 ┃ 3 ┃\
|
|
|
|
|
┣━━━╋━━━╋━━━┫\
|
|
|
|
|
┃ 4 ┃ 5 ┃ 1 ┃\
|
|
|
|
|
┃ ┃ ┣━━━┫\
|
|
|
|
|
┃ ┃ ┃ 2 ┃\
|
|
|
|
|
┃ ┃ ┣━━━┫\
|
|
|
|
|
┃ ┃ ┃ 3 ┃\
|
|
|
|
|
┗━━━┻━━━┻━━━┛"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_compact() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: compact }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"┌───┬───┬───┐\
|
|
|
|
|
│ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 1 │ 2 │ 3 │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 4 │ 5 │ 1 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 2 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 3 │\
|
|
|
|
|
└───┴───┴───┘"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_compact_double() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: compact_double }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╔═══╦═══╦═══╗\
|
|
|
|
|
║ a ║ b ║ c ║\
|
|
|
|
|
╠═══╬═══╬═══╣\
|
|
|
|
|
║ 1 ║ 2 ║ 3 ║\
|
|
|
|
|
╠═══╬═══╬═══╣\
|
|
|
|
|
║ 4 ║ 5 ║ 1 ║\
|
|
|
|
|
║ ║ ╠═══╣\
|
|
|
|
|
║ ║ ║ 2 ║\
|
|
|
|
|
║ ║ ╠═══╣\
|
|
|
|
|
║ ║ ║ 3 ║\
|
|
|
|
|
╚═══╩═══╩═══╝"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_compact_light() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: light }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"┌───┬───┬───┐\
|
|
|
|
|
│ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 1 │ 2 │ 3 │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 4 │ 5 │ 1 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 2 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 3 │\
|
|
|
|
|
└───┴───┴───┘"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_none() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: none }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
concat!(
|
2023-04-26 20:56:10 +02:00
|
|
|
|
" a b c ",
|
|
|
|
|
" 1 2 3 ",
|
|
|
|
|
" 4 5 1 ",
|
|
|
|
|
" 2 ",
|
|
|
|
|
" 3 ",
|
2023-02-16 20:32:07 +01:00
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_compact_reinforced() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: reinforced }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"┏───┬───┬───┓\
|
|
|
|
|
│ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 1 │ 2 │ 3 │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 4 │ 5 │ 1 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 2 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 3 │\
|
|
|
|
|
┗───┴───┴───┛"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_compact_thin() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: thin }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"┌───┬───┬───┐\
|
|
|
|
|
│ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 1 │ 2 │ 3 │\
|
|
|
|
|
├───┼───┼───┤\
|
|
|
|
|
│ 4 │ 5 │ 1 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 2 │\
|
|
|
|
|
│ │ ├───┤\
|
|
|
|
|
│ │ │ 3 │\
|
|
|
|
|
└───┴───┴───┘"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_hearts() {
|
|
|
|
|
let actual = nu!(nu_repl_code(&[
|
2023-06-30 21:57:51 +02:00
|
|
|
|
"$env.config = { table: { mode: with_love }};",
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --collapse"
|
2023-02-16 20:32:07 +01:00
|
|
|
|
]));
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
concat!(
|
|
|
|
|
"❤❤❤❤❤❤❤❤❤❤❤❤❤",
|
|
|
|
|
"❤ a ❤ b ❤ c ❤",
|
|
|
|
|
"❤❤❤❤❤❤❤❤❤❤❤❤❤",
|
|
|
|
|
"❤ 1 ❤ 2 ❤ 3 ❤",
|
|
|
|
|
"❤❤❤❤❤❤❤❤❤❤❤❤❤",
|
|
|
|
|
"❤ 4 ❤ 5 ❤ 1 ❤",
|
|
|
|
|
"❤ ❤ ❤❤❤❤❤",
|
|
|
|
|
"❤ ❤ ❤ 2 ❤",
|
|
|
|
|
"❤ ❤ ❤❤❤❤❤",
|
|
|
|
|
"❤ ❤ ❤ 3 ❤",
|
|
|
|
|
"❤❤❤❤❤❤❤❤❤❤❤❤❤",
|
|
|
|
|
)
|
2022-10-03 18:40:16 +02:00
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-22 19:35:45 +01:00
|
|
|
|
#[test]
|
2023-04-26 20:56:10 +02:00
|
|
|
|
fn table_collapse_does_wrapping_for_long_strings() {
|
2023-02-22 19:35:45 +01:00
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a]; [11111111111111111111111111111111111111111111111111111111111111111111111111111111]] | table --width=80 --collapse"
|
2023-02-22 19:35:45 +01:00
|
|
|
|
);
|
2023-04-26 20:56:10 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭────────────────────────────────╮\
|
|
|
|
|
│ a │\
|
|
|
|
|
├────────────────────────────────┤\
|
|
|
|
|
│ 111111111111111109312339230430 │\
|
|
|
|
|
│ 179149313814687359833671239329 │\
|
sync default config / env with default behaviour without any configuration (#9676)
related PRs and issues
- supersedes https://github.com/nushell/nushell/pull/9633
- should close https://github.com/nushell/nushell/issues/9630
# Description
this PR updates the `default_config.nu` config file and the `config.rs`
module in `nu_protocol` so that the default behaviour of Nushell,
without any config, and the one with `default_config.nu` and
`default_env.nu` are the same.
## changelog
- 3e2bfc9bb: copy the structure of `default_config.nu` inside the
implementation of `Default` in the `config.rs` module for easier check
of the default values
- e25e5ccd6: sync all the *simple* config fields, i.e. the
non-structured ones
- ae7e8111c: set the `display_output` hook to always run `table`
- a09a1c564: leave only the default menus => i've removed
`commands_menu`, `vars_menu` and `commands_with_description`
## todo
- [x] ~~check the defaults in `$env.config.explore`~~ done in 173bdbba5
and b9622084c
- [x] ~~check the defaults in `$env.config.color_config`~~ done in
c411d781d => the theme is now `{}` by default so that it's the same as
the default one with `--no-config`
- [x] ~~check the defaults `$env.config.keybindings`~~ done in 715a69797
- already available with the selected mode: `completion_previous`,
`next_page`, `undo_or_previous_page`, `yank`, `unix-line-discard` and
`kill-line`, e.g. in *vi* mode, `unlix-line-discard` is done in NORMAL
mode with either `d0` from the end of the line or `dd` from anywhere in
the line and `kill-line` is done in NORMAL mode with `shift + d`. these
bindings are available by default in *emacs* mode as well.
- previously with removed custom menus: `commands_menu`, `vars_menu` and
`commands_with_description`
- [x] ~~check `$env.config.datetime_format`~~ done in 0ced6b8ec => as
there is no *human* format for datetimes, i've commented out both
`$env.config.datetime_format` fields
- [x] ~~fix `default_env.nu`~~ done in 67c215011
# User-Facing Changes
this should not change anything, just make sure the default behaviour of
Nushell and the `default_config.nu` are in sync.
# Tests + Formatting
# After Submitting
2023-07-18 18:22:00 +02:00
|
|
|
|
│ 01313323321729744896.00 │\
|
2023-04-26 20:56:10 +02:00
|
|
|
|
╰────────────────────────────────╯"
|
|
|
|
|
);
|
2023-02-22 19:35:45 +01:00
|
|
|
|
}
|
|
|
|
|
|
2022-10-03 18:40:16 +02:00
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_0() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!("[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 --expand");
|
2022-10-03 18:40:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───┬───┬───────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┼───────────┤\
|
2022-12-05 00:47:46 +01:00
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───┬───╮ │\
|
2022-10-03 18:40:16 +02:00
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ 3 │ │\
|
|
|
|
|
│ │ │ │ ╰───┴───╯ │\
|
|
|
|
|
╰───┴───┴───┴───────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-15 03:03:32 +01:00
|
|
|
|
// I am not sure whether the test is platform dependent, cause we don't set a term_width on our own
|
2022-11-16 15:03:56 +01:00
|
|
|
|
#[test]
|
2023-01-15 03:03:32 +01:00
|
|
|
|
fn table_expand_exceed_overlap_0() {
|
2022-11-16 15:03:56 +01:00
|
|
|
|
// no expand
|
|
|
|
|
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual =
|
|
|
|
|
nu!("[[a b, c]; [xxxxxxxxxxxxxxxxxxxxxx 2 3] [4 5 [1 2 3]]] | table --width=80 --expand");
|
2022-11-16 15:03:56 +01:00
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬────────────────────────┬───┬───────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼────────────────────────┼───┼───────────┤\
|
2022-12-05 00:47:46 +01:00
|
|
|
|
│ 0 │ xxxxxxxxxxxxxxxxxxxxxx │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───┬───╮ │\
|
2022-11-16 15:03:56 +01:00
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ 3 │ │\
|
|
|
|
|
│ │ │ │ ╰───┴───╯ │\
|
|
|
|
|
╰───┴────────────────────────┴───┴───────────╯",
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// expand
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 2 3] [4 5 [1 2 3]]] | table --width=80 --expand"
|
2022-11-16 15:03:56 +01:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭──────┬───────────────────────────────────────────────────┬─────┬─────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├──────┼───────────────────────────────────────────────────┼─────┼─────────────┤\
|
2022-12-05 00:47:46 +01:00
|
|
|
|
│ 0 │ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───┬───╮ │\
|
2022-11-16 15:03:56 +01:00
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ 3 │ │\
|
|
|
|
|
│ │ │ │ ╰───┴───╯ │\
|
|
|
|
|
╰──────┴───────────────────────────────────────────────────┴─────┴─────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-03 18:40:16 +02:00
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_deep_0() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual =
|
|
|
|
|
nu!("[[a b, c]; [1 2 3] [4 5 [1 2 [1 2 3]]]] | table --width=80 --expand --expand-deep=1");
|
2022-10-03 18:40:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───┬───┬────────────────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┼────────────────────────┤\
|
2022-12-05 00:47:46 +01:00
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───┬────────────────╮ │\
|
2022-10-03 18:40:16 +02:00
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ [list 3 items] │ │\
|
|
|
|
|
│ │ │ │ ╰───┴────────────────╯ │\
|
|
|
|
|
╰───┴───┴───┴────────────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_deep_1() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual =
|
|
|
|
|
nu!("[[a b, c]; [1 2 3] [4 5 [1 2 [1 2 3]]]] | table --width=80 --expand --expand-deep=0");
|
2022-10-03 18:40:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───┬───┬────────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┼────────────────┤\
|
2022-12-05 00:47:46 +01:00
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ [list 3 items] │\
|
2022-10-03 18:40:16 +02:00
|
|
|
|
╰───┴───┴───┴────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_flatten_0() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual =
|
|
|
|
|
nu!("[[a b, c]; [1 2 3] [4 5 [1 2 [1 1 1]]]] | table --width=80 --expand --flatten ");
|
2022-10-03 18:40:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───┬───┬───────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┼───────────────┤\
|
2022-12-05 00:47:46 +01:00
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───┬───────╮ │\
|
2022-10-03 18:40:16 +02:00
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ 1 1 1 │ │\
|
|
|
|
|
│ │ │ │ ╰───┴───────╯ │\
|
|
|
|
|
╰───┴───┴───┴───────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_flatten_1() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 [1 1 1]]]] | table --width=80 --expand --flatten --flatten-separator=,"
|
2022-10-03 18:40:16 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───┬───┬───────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┼───────────────┤\
|
2022-12-05 00:47:46 +01:00
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───┬───────╮ │\
|
2022-10-03 18:40:16 +02:00
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ 1,1,1 │ │\
|
|
|
|
|
│ │ │ │ ╰───┴───────╯ │\
|
|
|
|
|
╰───┴───┴───┴───────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_flatten_and_deep_1() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 [1 [1 1 1] 1]]]] | table --width=80 --expand --expand-deep=2 --flatten --flatten-separator=,"
|
2022-10-03 18:40:16 +02:00
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───┬───┬────────────────────────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┼────────────────────────────────┤\
|
2022-12-05 00:47:46 +01:00
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───┬────────────────────────╮ │\
|
2022-10-03 18:40:16 +02:00
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ ╭───┬────────────────╮ │ │\
|
|
|
|
|
│ │ │ │ │ │ │ 0 │ 1 │ │ │\
|
|
|
|
|
│ │ │ │ │ │ │ 1 │ [list 3 items] │ │ │\
|
|
|
|
|
│ │ │ │ │ │ │ 2 │ 1 │ │ │\
|
|
|
|
|
│ │ │ │ │ │ ╰───┴────────────────╯ │ │\
|
|
|
|
|
│ │ │ │ ╰───┴────────────────────────╯ │\
|
|
|
|
|
╰───┴───┴───┴────────────────────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
2022-10-10 14:32:55 +02:00
|
|
|
|
|
2023-02-08 03:01:31 +01:00
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_record_0() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!("[{c: {d: 1}}] | table --width=80 --expand");
|
2023-02-08 03:01:31 +01:00
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───────────╮\
|
|
|
|
|
│ # │ c │\
|
|
|
|
|
├───┼───────────┤\
|
|
|
|
|
│ 0 │ ╭───┬───╮ │\
|
|
|
|
|
│ │ │ d │ 1 │ │\
|
|
|
|
|
│ │ ╰───┴───╯ │\
|
|
|
|
|
╰───┴───────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_record_1() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual =
|
|
|
|
|
nu!("[[a b, c]; [1 2 3] [4 5 [1 2 {a: 123, b: 234, c: 345}]]] | table --width=80 --expand");
|
2023-02-08 03:01:31 +01:00
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───┬───┬─────────────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───┼───┼───┼─────────────────────┤\
|
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───┬─────────────╮ │\
|
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ ╭───┬─────╮ │ │\
|
|
|
|
|
│ │ │ │ │ │ │ a │ 123 │ │ │\
|
|
|
|
|
│ │ │ │ │ │ │ b │ 234 │ │ │\
|
|
|
|
|
│ │ │ │ │ │ │ c │ 345 │ │ │\
|
|
|
|
|
│ │ │ │ │ │ ╰───┴─────╯ │ │\
|
|
|
|
|
│ │ │ │ ╰───┴─────────────╯ │\
|
|
|
|
|
╰───┴───┴───┴─────────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_record_2() {
|
|
|
|
|
let structure = "{\
|
|
|
|
|
field1: [ a, b, c ],\
|
|
|
|
|
field2: [ 123, 234, 345 ],\
|
|
|
|
|
field3: [ [ head1, head2, head3 ]; [ 1 2 3 ] [ 79 79 79 ] [ { f1: 'a string', f2: 1000 }, 1, 2 ] ],\
|
|
|
|
|
field4: { f1: 1, f2: 3, f3: { f1: f1, f2: f2, f3: f3 } }\
|
|
|
|
|
}";
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!(format!("{structure} | table --width=80 --expand"));
|
2023-02-08 03:01:31 +01:00
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭────────┬───────────────────────────────────────────╮\
|
|
|
|
|
│ │ ╭───┬───╮ │\
|
|
|
|
|
│ field1 │ │ 0 │ a │ │\
|
|
|
|
|
│ │ │ 1 │ b │ │\
|
|
|
|
|
│ │ │ 2 │ c │ │\
|
|
|
|
|
│ │ ╰───┴───╯ │\
|
|
|
|
|
│ │ ╭───┬─────╮ │\
|
|
|
|
|
│ field2 │ │ 0 │ 123 │ │\
|
|
|
|
|
│ │ │ 1 │ 234 │ │\
|
|
|
|
|
│ │ │ 2 │ 345 │ │\
|
|
|
|
|
│ │ ╰───┴─────╯ │\
|
|
|
|
|
│ │ ╭───┬───────────────────┬───────┬───────╮ │\
|
|
|
|
|
│ field3 │ │ # │ head1 │ head2 │ head3 │ │\
|
|
|
|
|
│ │ ├───┼───────────────────┼───────┼───────┤ │\
|
|
|
|
|
│ │ │ 0 │ 1 │ 2 │ 3 │ │\
|
|
|
|
|
│ │ │ 1 │ 79 │ 79 │ 79 │ │\
|
|
|
|
|
│ │ │ 2 │ ╭────┬──────────╮ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ f1 │ a string │ │ │ │ │\
|
|
|
|
|
│ │ │ │ │ f2 │ 1000 │ │ │ │ │\
|
|
|
|
|
│ │ │ │ ╰────┴──────────╯ │ │ │ │\
|
|
|
|
|
│ │ ╰───┴───────────────────┴───────┴───────╯ │\
|
|
|
|
|
│ │ ╭────┬─────────────╮ │\
|
|
|
|
|
│ field4 │ │ f1 │ 1 │ │\
|
|
|
|
|
│ │ │ f2 │ 3 │ │\
|
|
|
|
|
│ │ │ │ ╭────┬────╮ │ │\
|
|
|
|
|
│ │ │ f3 │ │ f1 │ f1 │ │ │\
|
|
|
|
|
│ │ │ │ │ f2 │ f2 │ │ │\
|
|
|
|
|
│ │ │ │ │ f3 │ f3 │ │ │\
|
|
|
|
|
│ │ │ │ ╰────┴────╯ │ │\
|
|
|
|
|
│ │ ╰────┴─────────────╯ │\
|
|
|
|
|
╰────────┴───────────────────────────────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2022-10-10 14:32:55 +02:00
|
|
|
|
#[test]
|
|
|
|
|
#[cfg(not(windows))]
|
|
|
|
|
fn external_with_too_much_stdout_should_not_hang_nu() {
|
|
|
|
|
use nu_test_support::fs::Stub::FileWithContent;
|
|
|
|
|
use nu_test_support::pipeline;
|
|
|
|
|
use nu_test_support::playground::Playground;
|
|
|
|
|
Playground::setup("external with too much stdout", |dirs, sandbox| {
|
|
|
|
|
let bytes: usize = 81920;
|
|
|
|
|
let mut large_file_body = String::with_capacity(bytes);
|
|
|
|
|
for _ in 0..bytes {
|
2022-10-18 20:13:36 +02:00
|
|
|
|
large_file_body.push('a');
|
2022-10-10 14:32:55 +02:00
|
|
|
|
}
|
2024-05-04 02:53:15 +02:00
|
|
|
|
sandbox.with_files(&[FileWithContent("a_large_file.txt", &large_file_body)]);
|
2022-10-10 14:32:55 +02:00
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
|
|
|
|
cwd: dirs.test(), pipeline(
|
2023-07-21 17:32:37 +02:00
|
|
|
|
"
|
2023-09-25 18:17:42 +02:00
|
|
|
|
cat a_large_file.txt | table --width=80
|
2023-07-21 17:32:37 +02:00
|
|
|
|
"
|
2022-10-10 14:32:55 +02:00
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
assert_eq!(actual.out, large_file_body);
|
|
|
|
|
})
|
|
|
|
|
}
|
2022-10-21 18:02:25 +02:00
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_pagging_row_offset_overlap() {
|
2023-07-21 17:32:37 +02:00
|
|
|
|
let actual = nu!("0..1000");
|
2022-12-15 18:55:15 +01:00
|
|
|
|
assert_eq!(actual.out, "╭─────┬─────╮│ 0 │ 0 ││ 1 │ 1 ││ 2 │ 2 ││ 3 │ 3 ││ 4 │ 4 ││ 5 │ 5 ││ 6 │ 6 ││ 7 │ 7 ││ 8 │ 8 ││ 9 │ 9 ││ 10 │ 10 ││ 11 │ 11 ││ 12 │ 12 ││ 13 │ 13 ││ 14 │ 14 ││ 15 │ 15 ││ 16 │ 16 ││ 17 │ 17 ││ 18 │ 18 ││ 19 │ 19 ││ 20 │ 20 ││ 21 │ 21 ││ 22 │ 22 ││ 23 │ 23 ││ 24 │ 24 ││ 25 │ 25 ││ 26 │ 26 ││ 27 │ 27 ││ 28 │ 28 ││ 29 │ 29 ││ 30 │ 30 ││ 31 │ 31 ││ 32 │ 32 ││ 33 │ 33 ││ 34 │ 34 ││ 35 │ 35 ││ 36 │ 36 ││ 37 │ 37 ││ 38 │ 38 ││ 39 │ 39 ││ 40 │ 40 ││ 41 │ 41 ││ 42 │ 42 ││ 43 │ 43 ││ 44 │ 44 ││ 45 │ 45 ││ 46 │ 46 ││ 47 │ 47 ││ 48 │ 48 ││ 49 │ 49 ││ 50 │ 50 ││ 51 │ 51 ││ 52 │ 52 ││ 53 │ 53 ││ 54 │ 54 ││ 55 │ 55 ││ 56 │ 56 ││ 57 │ 57 ││ 58 │ 58 ││ 59 │ 59 ││ 60 │ 60 ││ 61 │ 61 ││ 62 │ 62 ││ 63 │ 63 ││ 64 │ 64 ││ 65 │ 65 ││ 66 │ 66 ││ 67 │ 67 ││ 68 │ 68 ││ 69 │ 69 ││ 70 │ 70 ││ 71 │ 71 ││ 72 │ 72 ││ 73 │ 73 ││ 74 │ 74 ││ 75 │ 75 ││ 76 │ 76 ││ 77 │ 77 ││ 78 │ 78 ││ 79 │ 79 ││ 80 │ 80 ││ 81 │ 81 ││ 82 │ 82 ││ 83 │ 83 ││ 84 │ 84 ││ 85 │ 85 ││ 86 │ 86 ││ 87 │ 87 ││ 88 │ 88 ││ 89 │ 89 ││ 90 │ 90 ││ 91 │ 91 ││ 92 │ 92 ││ 93 │ 93 ││ 94 │ 94 ││ 95 │ 95 ││ 96 │ 96 ││ 97 │ 97 ││ 98 │ 98 ││ 99 │ 99 ││ 100 │ 100 ││ 101 │ 101 ││ 102 │ 102 ││ 103 │ 103 ││ 104 │ 104 ││ 105 │ 105 ││ 106 │ 106 ││ 107 │ 107 ││ 108 │ 108 ││ 109 │ 109 ││ 110 │ 110 ││ 111 │ 111 ││ 112 │ 112 ││ 113 │ 113 ││ 114 │ 114 ││ 115 │ 115 ││ 116 │ 116 ││ 117 │ 117 ││ 118 │ 118 ││ 119 │ 119 ││ 120 │ 120 ││ 121 │ 121 ││ 122 │ 122 ││ 123 │ 123 ││ 124 │ 124 ││ 125 │ 125 ││ 126 │ 126 ││ 127 │ 127 ││ 128 │ 128 ││ 129 │ 129 ││ 130 │ 130 ││ 131 │ 131 ││ 132 │ 132 ││ 133 │ 133 ││ 134 │ 134 ││ 135 │ 135 ││ 136 │ 136 ││ 137 │ 137 ││ 138 │ 138 ││ 139 │ 139 ││ 140 │ 140 ││ 141 │ 141 ││ 142 │ 142 ││ 143 │ 143 ││ 144 │ 144 ││ 145 │ 145 ││ 146 │ 146 ││ 147 │ 147 ││ 148 │ 148 ││ 149 │ 149 ││ 150 │ 150 ││ 151 │ 151 ││ 152 │ 152 ││ 153 │ 153 ││ 154 │ 154 ││ 155 │ 155 ││ 156 │ 156 ││ 157 │ 157 ││ 158 │ 158 ││ 159 │ 159 ││ 160 │ 160 ││ 161 │ 161 ││ 162 │ 162 ││ 163 │ 163 ││ 164 │ 164 ││ 165 │ 165 ││ 166 │ 166 ││ 167 │ 167 ││ 168 │ 168 ││ 169 │ 169 ││ 170 │ 170 ││ 171 │ 171 ││ 172 │ 172 ││ 173 │ 173 ││ 174 │ 174 ││ 175 │ 175 ││ 176 │ 176 ││ 177 │ 177 ││ 178 │ 178 ││ 179 │ 179 ││ 180 │ 180 ││ 181 │ 181 ││ 182 │ 182 ││ 183 │ 183 ││ 184 │ 184 ││ 185 │ 185 ││ 186 │ 186 ││ 187 │ 187 ││ 188 │ 188 ││ 189 │ 189 ││ 190 │ 190 ││ 191 │ 191 ││ 192 │ 192 ││ 193 │ 193 ││ 194 │ 194 ││ 195 │ 195 ││ 196 │ 196 ││ 197 │ 197 ││ 198 │ 198 ││ 199 │ 199 ││ 200 │ 200 ││ 201 │ 201 ││ 202 │ 202 ││ 203 │ 203 ││ 204 │ 204 ││ 205 │ 205 ││ 206 │ 206 ││ 207 │ 207 ││ 208 │ 208 ││ 209 │ 209 ││ 210 │ 210 ││ 211 │ 211 │
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_index_0() {
|
2023-07-21 17:32:37 +02:00
|
|
|
|
let actual = nu!("[1 3 1 3 2 1 1]");
|
2022-10-21 18:02:25 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
2022-12-15 18:55:15 +01:00
|
|
|
|
"╭───┬───╮│ 0 │ 1 ││ 1 │ 3 ││ 2 │ 1 ││ 3 │ 3 ││ 4 │ 2 ││ 5 │ 1 ││ 6 │ 1 │╰───┴───╯"
|
2022-10-21 18:02:25 +02:00
|
|
|
|
);
|
|
|
|
|
}
|
2023-01-26 21:06:17 +01:00
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn test_expand_big_0() {
|
|
|
|
|
Playground::setup("test_expand_big_0", |dirs, sandbox| {
|
2024-05-04 02:53:15 +02:00
|
|
|
|
sandbox.with_files(&[FileWithContent(
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"sample.toml",
|
|
|
|
|
r#"
|
|
|
|
|
[package]
|
|
|
|
|
authors = ["The Nushell Project Developers"]
|
|
|
|
|
default-run = "nu"
|
|
|
|
|
description = "A new type of shell"
|
|
|
|
|
documentation = "https://www.nushell.sh/book/"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
exclude = ["images"]
|
|
|
|
|
homepage = "https://www.nushell.sh"
|
|
|
|
|
license = "MIT"
|
|
|
|
|
name = "nu"
|
|
|
|
|
repository = "https://github.com/nushell/nushell"
|
|
|
|
|
rust-version = "1.60"
|
|
|
|
|
version = "0.74.1"
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[package.metadata.binstall]
|
|
|
|
|
pkg-url = "{ repo }/releases/download/{ version }/{ name }-{ version }-{ target }.{ archive-format }"
|
|
|
|
|
pkg-fmt = "tgz"
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
|
|
|
|
|
pkg-fmt = "zip"
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[workspace]
|
|
|
|
|
members = [
|
|
|
|
|
"crates/nu-cli",
|
|
|
|
|
"crates/nu-engine",
|
|
|
|
|
"crates/nu-parser",
|
|
|
|
|
"crates/nu-system",
|
|
|
|
|
"crates/nu-command",
|
|
|
|
|
"crates/nu-protocol",
|
|
|
|
|
"crates/nu-plugin",
|
|
|
|
|
"crates/nu_plugin_inc",
|
|
|
|
|
"crates/nu_plugin_gstat",
|
|
|
|
|
"crates/nu_plugin_example",
|
|
|
|
|
"crates/nu_plugin_query",
|
|
|
|
|
"crates/nu_plugin_custom_values",
|
|
|
|
|
"crates/nu-utils",
|
|
|
|
|
]
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[dependencies]
|
|
|
|
|
chrono = { version = "0.4.23", features = ["serde"] }
|
|
|
|
|
crossterm = "0.24.0"
|
|
|
|
|
ctrlc = "3.2.1"
|
|
|
|
|
log = "0.4"
|
|
|
|
|
miette = { version = "5.5.0", features = ["fancy-no-backtrace"] }
|
|
|
|
|
nu-ansi-term = "0.46.0"
|
|
|
|
|
nu-cli = { path = "./crates/nu-cli", version = "0.74.1" }
|
|
|
|
|
nu-engine = { path = "./crates/nu-engine", version = "0.74.1" }
|
|
|
|
|
reedline = { version = "0.14.0", features = ["bashisms", "sqlite"] }
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
rayon = "1.6.1"
|
|
|
|
|
is_executable = "1.0.1"
|
|
|
|
|
simplelog = "0.12.0"
|
|
|
|
|
time = "0.3.12"
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[target.'cfg(not(target_os = "windows"))'.dependencies]
|
|
|
|
|
# Our dependencies don't use OpenSSL on Windows
|
|
|
|
|
openssl = { version = "0.10.38", features = ["vendored"], optional = true }
|
|
|
|
|
signal-hook = { version = "0.3.14", default-features = false }
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
|
|
|
winres = "0.1"
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[target.'cfg(target_family = "unix")'.dependencies]
|
|
|
|
|
nix = { version = "0.25", default-features = false, features = ["signal", "process", "fs", "term"] }
|
|
|
|
|
atty = "0.2"
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[dev-dependencies]
|
|
|
|
|
nu-test-support = { path = "./crates/nu-test-support", version = "0.74.1" }
|
|
|
|
|
tempfile = "3.2.0"
|
|
|
|
|
assert_cmd = "2.0.2"
|
|
|
|
|
criterion = "0.4"
|
|
|
|
|
pretty_assertions = "1.0.0"
|
|
|
|
|
serial_test = "0.10.0"
|
|
|
|
|
hamcrest2 = "0.3.0"
|
|
|
|
|
rstest = { version = "0.15.0", default-features = false }
|
|
|
|
|
itertools = "0.10.3"
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
[features]
|
|
|
|
|
plugin = [
|
|
|
|
|
"nu-plugin",
|
|
|
|
|
"nu-cli/plugin",
|
|
|
|
|
"nu-parser/plugin",
|
|
|
|
|
"nu-command/plugin",
|
|
|
|
|
"nu-protocol/plugin",
|
|
|
|
|
"nu-engine/plugin",
|
|
|
|
|
]
|
|
|
|
|
# extra used to be more useful but now it's the same as default. Leaving it in for backcompat with existing build scripts
|
|
|
|
|
extra = ["default"]
|
|
|
|
|
default = ["plugin", "which-support", "trash-support", "sqlite"]
|
|
|
|
|
stable = ["default"]
|
|
|
|
|
wasi = []
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
# Enable to statically link OpenSSL; otherwise the system version will be used. Not enabled by default because it takes a while to build
|
|
|
|
|
static-link-openssl = ["dep:openssl"]
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
# Stable (Default)
|
|
|
|
|
which-support = ["nu-command/which-support"]
|
|
|
|
|
trash-support = ["nu-command/trash-support"]
|
|
|
|
|
|
|
|
|
|
# Main nu binary
|
|
|
|
|
[[bin]]
|
|
|
|
|
name = "nu"
|
|
|
|
|
path = "src/main.rs"
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
# To use a development version of a dependency please use a global override here
|
|
|
|
|
# changing versions in each sub-crate of the workspace is tedious
|
|
|
|
|
[patch.crates-io]
|
|
|
|
|
reedline = { git = "https://github.com/nushell/reedline.git", branch = "main" }
|
2023-04-14 22:14:57 +02:00
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
# Criterion benchmarking setup
|
|
|
|
|
# Run all benchmarks with `cargo bench`
|
|
|
|
|
# Run individual benchmarks like `cargo bench -- <regex>` e.g. `cargo bench -- parse`
|
|
|
|
|
[[bench]]
|
|
|
|
|
name = "benchmarks"
|
|
|
|
|
harness = false
|
|
|
|
|
"#,
|
|
|
|
|
)]);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
|
|
|
|
cwd: dirs.test(), pipeline(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"open sample.toml | table --width=80 --expand"
|
2023-01-26 21:06:17 +01:00
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
let expected = join_lines([
|
|
|
|
|
"╭──────────────────┬───────────────────────────────────────────────────────────╮",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───────────────┬───────────────────────────────────────╮ │",
|
|
|
|
|
"│ package │ │ │ ╭───┬───────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ authors │ │ 0 │ The Nushell Project │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ Developers │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴───────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ default-run │ nu │ │",
|
|
|
|
|
"│ │ │ description │ A new type of shell │ │",
|
|
|
|
|
"│ │ │ documentation │ https://www.nushell.sh/book/ │ │",
|
|
|
|
|
"│ │ │ edition │ 2021 │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬────────╮ │ │",
|
|
|
|
|
"│ │ │ exclude │ │ 0 │ images │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴────────╯ │ │",
|
|
|
|
|
"│ │ │ homepage │ https://www.nushell.sh │ │",
|
|
|
|
|
"│ │ │ license │ MIT │ │",
|
|
|
|
|
"│ │ │ name │ nu │ │",
|
|
|
|
|
"│ │ │ repository │ https://github.com/nushell/nushell │ │",
|
|
|
|
|
"│ │ │ rust-version │ 1.60 │ │",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────┬────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ metadata │ │ │ ╭───────────┬────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ binstall │ │ pkg-url │ { repo │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ }/rel │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ eases/ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ downlo │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ad/{ v │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ersion │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ }/{ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ name │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ }-{ ve │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ rsion │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ }-{ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ target │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ }.{ a │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ rchive │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ -forma │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ t } │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ pkg-fmt │ tgz │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ overrides │ {recor │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ d 1 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ field} │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───────────┴────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰───────────────┴───────────────────────────────────────╯ │",
|
|
|
|
|
"│ │ ╭───────────┬───────────────────────────────────────────╮ │",
|
|
|
|
|
"│ workspace │ │ │ ╭────┬────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ members │ │ 0 │ crates/nu-cli │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ crates/nu-engine │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ crates/nu-parser │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ crates/nu-system │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ crates/nu-command │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ crates/nu-protocol │ │ │",
|
|
|
|
|
"│ │ │ │ │ 6 │ crates/nu-plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 7 │ crates/nu_plugin_inc │ │ │",
|
|
|
|
|
"│ │ │ │ │ 8 │ crates/nu_plugin_gstat │ │ │",
|
|
|
|
|
"│ │ │ │ │ 9 │ crates/nu_plugin_example │ │ │",
|
|
|
|
|
"│ │ │ │ │ 10 │ crates/nu_plugin_query │ │ │",
|
|
|
|
|
"│ │ │ │ │ 11 │ crates/nu_plugin_custom_values │ │ │",
|
|
|
|
|
"│ │ │ │ │ 12 │ crates/nu-utils │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────┴────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰───────────┴───────────────────────────────────────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────────┬───────────────────────────────────────╮ │",
|
|
|
|
|
"│ dependencies │ │ │ ╭──────────┬───────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ chrono │ │ version │ 0.4.23 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭───┬───────╮ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ features │ │ 0 │ serde │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴───────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴───────────────╯ │ │",
|
|
|
|
|
"│ │ │ crossterm │ 0.24.0 │ │",
|
|
|
|
|
"│ │ │ ctrlc │ 3.2.1 │ │",
|
|
|
|
|
"│ │ │ log │ 0.4 │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────┬────────────────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ miette │ │ version │ 5.5.0 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭───┬────────────────╮ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ features │ │ 0 │ fancy-no-backt │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ race │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴────────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ nu-ansi-term │ 0.46.0 │ │",
|
|
|
|
|
"│ │ │ │ ╭─────────┬─────────────────╮ │ │",
|
|
|
|
|
"│ │ │ nu-cli │ │ path │ ./crates/nu-cli │ │ │",
|
|
|
|
|
"│ │ │ │ │ version │ 0.74.1 │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────┴─────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────┬──────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ nu-engine │ │ path │ ./crates/nu-engine │ │ │",
|
|
|
|
|
"│ │ │ │ │ version │ 0.74.1 │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────┴──────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭─────────────┬─────────────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ reedline │ │ version │ 0.14.0 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭───┬──────────╮ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ features │ │ 0 │ bashisms │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ 1 │ sqlite │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴──────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────────┴─────────────────────╯ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ rayon │ 1.6.1 │ │",
|
|
|
|
|
"│ │ │ is_executable │ 1.0.1 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ simplelog │ 0.12.0 │ │",
|
|
|
|
|
"│ │ │ time │ 0.3.12 │ │",
|
|
|
|
|
"│ │ ╰───────────────┴───────────────────────────────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭─────────────────────────────────┬─────────────────────╮ │",
|
|
|
|
|
"│ target │ │ │ ╭──────────────┬──╮ │ │",
|
|
|
|
|
"│ │ │ cfg(not(target_os = \"windows\")) │ │ dependencies │ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────────┴──╯ │ │",
|
|
|
|
|
"│ │ │ cfg(windows) │ {record 1 field} │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────────┬──╮ │ │",
|
|
|
|
|
"│ │ │ cfg(target_family = \"unix\") │ │ dependencies │ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────────┴──╯ │ │",
|
|
|
|
|
"│ │ ╰─────────────────────────────────┴─────────────────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────────────┬───────────────────────────────────╮ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ dev-dependencies │ │ │ ╭─────────┬─────────────────────╮ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ nu-test-support │ │ path │ ./crates/nu-test-su │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ pport │ │ │",
|
|
|
|
|
"│ │ │ │ │ version │ 0.74.1 │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────┴─────────────────────╯ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ tempfile │ 3.2.0 │ │",
|
|
|
|
|
"│ │ │ assert_cmd │ 2.0.2 │ │",
|
|
|
|
|
"│ │ │ criterion │ 0.4 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ pretty_assertions │ 1.0.0 │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ serial_test │ 0.10.0 │ │",
|
|
|
|
|
"│ │ │ hamcrest2 │ 0.3.0 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ ╭────────────────────┬──────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ rstest │ │ version │ 0.15.0 │ │ │",
|
|
|
|
|
"│ │ │ │ │ default-features │ false │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ ╰────────────────────┴──────────╯ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ itertools │ 0.10.3 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╰───────────────────┴───────────────────────────────────╯ │",
|
|
|
|
|
"│ │ ╭─────────────────────┬─────────────────────────────────╮ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ features │ │ │ ╭───┬────────────────────╮ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ plugin │ │ 0 │ nu-plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ nu-cli/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ nu-parser/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ nu-command/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ nu-protocol/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ nu-engine/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ extra │ │ 0 │ default │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬───────────────╮ │ │",
|
|
|
|
|
"│ │ │ default │ │ 0 │ plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ which-support │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ trash-support │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ sqlite │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴───────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────────╮ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ stable │ │ 0 │ default │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────────╯ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ wasi │ [list 0 items] │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ ╭───┬─────────────╮ │ │",
|
|
|
|
|
"│ │ │ static-link-openssl │ │ 0 │ dep:openssl │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────────────────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ which-support │ │ 0 │ nu-command/which-suppor │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────────────────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ trash-support │ │ 0 │ nu-command/trash-suppor │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰─────────────────────┴─────────────────────────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───┬──────┬─────────────╮ │",
|
|
|
|
|
"│ bin │ │ # │ name │ path │ │",
|
|
|
|
|
"│ │ ├───┼──────┼─────────────┤ │",
|
|
|
|
|
"│ │ │ 0 │ nu │ src/main.rs │ │",
|
|
|
|
|
"│ │ ╰───┴──────┴─────────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────┬───────────────────────────────────────────╮ │",
|
|
|
|
|
"│ patch │ │ │ ╭──────────┬────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ crates-io │ │ │ ╭────────┬───────────────╮ │ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ │ │ reedline │ │ git │ https://githu │ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ │ │ b.com/nushell │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ /reedline.git │ │ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ │ │ │ │ branch │ main │ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ ╰────────┴───────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰───────────┴───────────────────────────────────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───┬────────────┬─────────╮ │",
|
|
|
|
|
"│ bench │ │ # │ name │ harness │ │",
|
|
|
|
|
"│ │ ├───┼────────────┼─────────┤ │",
|
|
|
|
|
"│ │ │ 0 │ benchmarks │ false │ │",
|
|
|
|
|
"│ │ ╰───┴────────────┴─────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"╰──────────────────┴───────────────────────────────────────────────────────────╯",
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
assert_eq!(actual.out, expected);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
|
|
|
|
cwd: dirs.test(), pipeline(
|
|
|
|
|
"open sample.toml | table --expand --width=120"
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
let expected = join_lines([
|
|
|
|
|
"╭──────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────╮",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───────────────┬───────────────────────────────────────────────────────────────────────────────╮ │",
|
|
|
|
|
"│ package │ │ │ ╭───┬────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ authors │ │ 0 │ The Nushell Project Developers │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ default-run │ nu │ │",
|
|
|
|
|
"│ │ │ description │ A new type of shell │ │",
|
|
|
|
|
"│ │ │ documentation │ https://www.nushell.sh/book/ │ │",
|
|
|
|
|
"│ │ │ edition │ 2021 │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬────────╮ │ │",
|
|
|
|
|
"│ │ │ exclude │ │ 0 │ images │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴────────╯ │ │",
|
|
|
|
|
"│ │ │ homepage │ https://www.nushell.sh │ │",
|
|
|
|
|
"│ │ │ license │ MIT │ │",
|
|
|
|
|
"│ │ │ name │ nu │ │",
|
|
|
|
|
"│ │ │ repository │ https://github.com/nushell/nushell │ │",
|
|
|
|
|
"│ │ │ rust-version │ 1.60 │ │",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────┬────────────────────────────────────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ metadata │ │ │ ╭───────────┬────────────────────────────────────────────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ binstall │ │ pkg-url │ { repo }/releases/download/{ version }/{ name │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ }-{ version }-{ target }.{ archive-format } │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ pkg-fmt │ tgz │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ╭────────────────────────┬───────────────────╮ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ overrides │ │ │ ╭─────────┬─────╮ │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ x86_64-pc-windows-msvc │ │ pkg-fmt │ zip │ │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ ╰─────────┴─────╯ │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ╰────────────────────────┴───────────────────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───────────┴────────────────────────────────────────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────────────────────────────────────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰───────────────┴───────────────────────────────────────────────────────────────────────────────╯ │",
|
|
|
|
|
"│ │ ╭─────────┬─────────────────────────────────────────╮ │",
|
|
|
|
|
"│ workspace │ │ │ ╭────┬────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ members │ │ 0 │ crates/nu-cli │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ crates/nu-engine │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ crates/nu-parser │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ crates/nu-system │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ crates/nu-command │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ crates/nu-protocol │ │ │",
|
|
|
|
|
"│ │ │ │ │ 6 │ crates/nu-plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 7 │ crates/nu_plugin_inc │ │ │",
|
|
|
|
|
"│ │ │ │ │ 8 │ crates/nu_plugin_gstat │ │ │",
|
|
|
|
|
"│ │ │ │ │ 9 │ crates/nu_plugin_example │ │ │",
|
|
|
|
|
"│ │ │ │ │ 10 │ crates/nu_plugin_query │ │ │",
|
|
|
|
|
"│ │ │ │ │ 11 │ crates/nu_plugin_custom_values │ │ │",
|
|
|
|
|
"│ │ │ │ │ 12 │ crates/nu-utils │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────┴────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰─────────┴─────────────────────────────────────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────────┬───────────────────────────────────────────╮ │",
|
|
|
|
|
"│ dependencies │ │ │ ╭──────────┬───────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ chrono │ │ version │ 0.4.23 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭───┬───────╮ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ features │ │ 0 │ serde │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴───────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴───────────────╯ │ │",
|
|
|
|
|
"│ │ │ crossterm │ 0.24.0 │ │",
|
|
|
|
|
"│ │ │ ctrlc │ 3.2.1 │ │",
|
|
|
|
|
"│ │ │ log │ 0.4 │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────┬────────────────────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ miette │ │ version │ 5.5.0 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭───┬────────────────────╮ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ features │ │ 0 │ fancy-no-backtrace │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴────────────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ nu-ansi-term │ 0.46.0 │ │",
|
|
|
|
|
"│ │ │ │ ╭─────────┬─────────────────╮ │ │",
|
|
|
|
|
"│ │ │ nu-cli │ │ path │ ./crates/nu-cli │ │ │",
|
|
|
|
|
"│ │ │ │ │ version │ 0.74.1 │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────┴─────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭─────────┬────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ nu-engine │ │ path │ ./crates/nu-engine │ │ │",
|
|
|
|
|
"│ │ │ │ │ version │ 0.74.1 │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────┴────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────┬──────────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ reedline │ │ version │ 0.14.0 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭───┬──────────╮ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ features │ │ 0 │ bashisms │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ 1 │ sqlite │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴──────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴──────────────────╯ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ rayon │ 1.6.1 │ │",
|
|
|
|
|
"│ │ │ is_executable │ 1.0.1 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ simplelog │ 0.12.0 │ │",
|
|
|
|
|
"│ │ │ time │ 0.3.12 │ │",
|
|
|
|
|
"│ │ ╰───────────────┴───────────────────────────────────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭─────────────────────────────────┬─────────────────────────────────────────────────────────────╮ │",
|
|
|
|
|
"│ target │ │ │ ╭──────────────┬──────────────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ cfg(not(target_os = \"windows\")) │ │ │ ╭─────────────┬────────────────────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ dependencies │ │ │ ╭──────────┬─────────╮ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ openssl │ │ version │ 0.10.38 │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ features │ [list 1 │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ item] │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ optional │ true │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ╰──────────┴─────────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ signal-hook │ {record 2 fields} │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰─────────────┴────────────────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────────┴──────────────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────────────┬──────────────────╮ │ │",
|
|
|
|
|
"│ │ │ cfg(windows) │ │ │ ╭────────┬─────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ build-dependencies │ │ winres │ 0.1 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰────────┴─────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────────────┴──────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────────┬──────────────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ cfg(target_family = \"unix\") │ │ │ ╭──────┬───────────────────────────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ dependencies │ │ │ ╭──────────────────┬────────╮ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ nix │ │ version │ 0.25 │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ default-features │ false │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ features │ [list │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 4 │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ items] │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ╰──────────────────┴────────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ atty │ 0.2 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────┴───────────────────────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────────┴──────────────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰─────────────────────────────────┴─────────────────────────────────────────────────────────────╯ │",
|
|
|
|
|
"│ │ ╭───────────────────┬────────────────────────────────────────╮ │",
|
|
|
|
|
"│ dev-dependencies │ │ │ ╭─────────┬──────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ nu-test-support │ │ path │ ./crates/nu-test-support │ │ │",
|
|
|
|
|
"│ │ │ │ │ version │ 0.74.1 │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────┴──────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ tempfile │ 3.2.0 │ │",
|
|
|
|
|
"│ │ │ assert_cmd │ 2.0.2 │ │",
|
|
|
|
|
"│ │ │ criterion │ 0.4 │ │",
|
|
|
|
|
"│ │ │ pretty_assertions │ 1.0.0 │ │",
|
|
|
|
|
"│ │ │ serial_test │ 0.10.0 │ │",
|
|
|
|
|
"│ │ │ hamcrest2 │ 0.3.0 │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────────────┬────────╮ │ │",
|
|
|
|
|
"│ │ │ rstest │ │ version │ 0.15.0 │ │ │",
|
|
|
|
|
"│ │ │ │ │ default-features │ false │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────────────┴────────╯ │ │",
|
|
|
|
|
"│ │ │ itertools │ 0.10.3 │ │",
|
|
|
|
|
"│ │ ╰───────────────────┴────────────────────────────────────────╯ │",
|
|
|
|
|
"│ │ ╭─────────────────────┬──────────────────────────────────╮ │",
|
|
|
|
|
"│ features │ │ │ ╭───┬────────────────────╮ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ plugin │ │ 0 │ nu-plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ nu-cli/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ nu-parser/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ nu-command/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ nu-protocol/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ nu-engine/plugin │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ extra │ │ 0 │ default │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬───────────────╮ │ │",
|
|
|
|
|
"│ │ │ default │ │ 0 │ plugin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ which-support │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ trash-support │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ sqlite │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴───────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────────╮ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ stable │ │ 0 │ default │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────────╯ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ wasi │ [list 0 items] │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ ╭───┬─────────────╮ │ │",
|
|
|
|
|
"│ │ │ static-link-openssl │ │ 0 │ dep:openssl │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬──────────────────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ which-support │ │ 0 │ nu-command/which-support │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ ╰───┴──────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬──────────────────────────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ trash-support │ │ 0 │ nu-command/trash-support │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ ╰───┴──────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰─────────────────────┴──────────────────────────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───┬──────┬─────────────╮ │",
|
|
|
|
|
"│ bin │ │ # │ name │ path │ │",
|
|
|
|
|
"│ │ ├───┼──────┼─────────────┤ │",
|
|
|
|
|
"│ │ │ 0 │ nu │ src/main.rs │ │",
|
|
|
|
|
"│ │ ╰───┴──────┴─────────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────┬───────────────────────────────────────────────────────────────────────────────────╮ │",
|
|
|
|
|
"│ patch │ │ │ ╭─────────────────┬─────────────────────────────────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ crates-io │ │ │ ╭────────┬─────────────────────────────────────────╮ │ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ │ │ reedline │ │ git │ https://github.com/nushell/reedline.git │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ branch │ main │ │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ ╰────────┴─────────────────────────────────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────────────┴─────────────────────────────────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰───────────┴───────────────────────────────────────────────────────────────────────────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───┬────────────┬─────────╮ │",
|
|
|
|
|
"│ bench │ │ # │ name │ harness │ │",
|
|
|
|
|
"│ │ ├───┼────────────┼─────────┤ │",
|
|
|
|
|
"│ │ │ 0 │ benchmarks │ false │ │",
|
|
|
|
|
"│ │ ╰───┴────────────┴─────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"╰──────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────╯",
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
assert_eq!(actual.out, expected);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
|
|
|
|
cwd: dirs.test(), pipeline(
|
|
|
|
|
"open sample.toml | table --expand --width=60"
|
|
|
|
|
));
|
|
|
|
|
|
2023-06-12 00:33:54 +02:00
|
|
|
|
_print_lines(&actual.out, 60);
|
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
let expected = join_lines([
|
|
|
|
|
"╭──────────────────┬───────────────────────────────────────╮",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───────────────┬───────────────────╮ │",
|
|
|
|
|
"│ package │ │ │ ╭───┬───────────╮ │ │",
|
|
|
|
|
"│ │ │ authors │ │ 0 │ The │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ Nushell │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ Project D │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ evelopers │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴───────────╯ │ │",
|
|
|
|
|
"│ │ │ default-run │ nu │ │",
|
|
|
|
|
"│ │ │ description │ A new type of │ │",
|
|
|
|
|
"│ │ │ │ shell │ │",
|
|
|
|
|
"│ │ │ documentation │ https://www.nushe │ │",
|
|
|
|
|
"│ │ │ │ ll.sh/book/ │ │",
|
|
|
|
|
"│ │ │ edition │ 2021 │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬────────╮ │ │",
|
|
|
|
|
"│ │ │ exclude │ │ 0 │ images │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴────────╯ │ │",
|
|
|
|
|
"│ │ │ homepage │ https://www.nushe │ │",
|
|
|
|
|
"│ │ │ │ ll.sh │ │",
|
|
|
|
|
"│ │ │ license │ MIT │ │",
|
|
|
|
|
"│ │ │ name │ nu │ │",
|
|
|
|
|
"│ │ │ repository │ https://github.co │ │",
|
|
|
|
|
"│ │ │ │ m/nushell/nushell │ │",
|
|
|
|
|
"│ │ │ rust-version │ 1.60 │ │",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────┬────╮ │ │",
|
|
|
|
|
"│ │ │ metadata │ │ binstall │ {r │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ec │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ or │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ d │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 3 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ fi │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ el │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ds │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ } │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────╯ │ │",
|
|
|
|
|
"│ │ ╰───────────────┴───────────────────╯ │",
|
|
|
|
|
"│ │ ╭─────────┬─────────────────────────╮ │",
|
|
|
|
|
"│ workspace │ │ │ ╭────┬────────────────╮ │ │",
|
|
|
|
|
"│ │ │ members │ │ 0 │ crates/nu-cli │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ crates/nu-engi │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ne │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ crates/nu-pars │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ er │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ crates/nu-syst │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ em │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ crates/nu-comm │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ and │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ crates/nu-prot │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ocol │ │ │",
|
|
|
|
|
"│ │ │ │ │ 6 │ crates/nu-plug │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ in │ │ │",
|
|
|
|
|
"│ │ │ │ │ 7 │ crates/nu_plug │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ in_inc │ │ │",
|
|
|
|
|
"│ │ │ │ │ 8 │ crates/nu_plug │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ in_gstat │ │ │",
|
|
|
|
|
"│ │ │ │ │ 9 │ crates/nu_plug │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ in_example │ │ │",
|
|
|
|
|
"│ │ │ │ │ 10 │ crates/nu_plug │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ in_query │ │ │",
|
|
|
|
|
"│ │ │ │ │ 11 │ crates/nu_plug │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ in_custom_valu │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ es │ │ │",
|
|
|
|
|
"│ │ │ │ │ 12 │ crates/nu-util │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ s │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────┴────────────────╯ │ │",
|
|
|
|
|
"│ │ ╰─────────┴─────────────────────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────────┬───────────────────╮ │",
|
|
|
|
|
"│ dependencies │ │ │ ╭──────────┬────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ chrono │ │ version │ 0. │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 4. │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 23 │ │ │",
|
|
|
|
|
"│ │ │ │ │ features │ [l │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ is │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 1 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ it │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ em │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ] │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────╯ │ │",
|
|
|
|
|
"│ │ │ crossterm │ 0.24.0 │ │",
|
|
|
|
|
"│ │ │ ctrlc │ 3.2.1 │ │",
|
|
|
|
|
"│ │ │ log │ 0.4 │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────┬────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ miette │ │ version │ 5. │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 5. │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 0 │ │ │",
|
|
|
|
|
"│ │ │ │ │ features │ [l │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ is │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 1 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ it │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ em │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ] │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────╯ │ │",
|
|
|
|
|
"│ │ │ nu-ansi-term │ 0.46.0 │ │",
|
|
|
|
|
"│ │ │ │ ╭─────────┬─────╮ │ │",
|
|
|
|
|
"│ │ │ nu-cli │ │ path │ ./c │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ rat │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ es/ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ cli │ │ │",
|
|
|
|
|
"│ │ │ │ │ version │ 0.7 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 4.1 │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────┴─────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭─────────┬─────╮ │ │",
|
|
|
|
|
"│ │ │ nu-engine │ │ path │ ./c │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ rat │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ es/ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ eng │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ine │ │ │",
|
|
|
|
|
"│ │ │ │ │ version │ 0.7 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 4.1 │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────┴─────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────┬────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ reedline │ │ version │ 0. │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 14 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ .0 │ │ │",
|
|
|
|
|
"│ │ │ │ │ features │ [l │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ is │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ 2 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ it │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ em │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ s] │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────┴────╯ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ rayon │ 1.6.1 │ │",
|
|
|
|
|
"│ │ │ is_executable │ 1.0.1 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ simplelog │ 0.12.0 │ │",
|
|
|
|
|
"│ │ │ time │ 0.3.12 │ │",
|
|
|
|
|
"│ │ ╰───────────────┴───────────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ target │ {record 3 fields} │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────────────┬───────────────╮ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ dev-dependencies │ │ nu-test-support │ {record 2 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ fields} │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ tempfile │ 3.2.0 │ │",
|
|
|
|
|
"│ │ │ assert_cmd │ 2.0.2 │ │",
|
|
|
|
|
"│ │ │ criterion │ 0.4 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ pretty_assertions │ 1.0.0 │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ serial_test │ 0.10.0 │ │",
|
|
|
|
|
"│ │ │ hamcrest2 │ 0.3.0 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ rstest │ {record 2 │ │",
|
|
|
|
|
"│ │ │ │ fields} │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ itertools │ 0.10.3 │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╰───────────────────┴───────────────╯ │",
|
|
|
|
|
"│ │ ╭─────────────────────┬─────────────╮ │",
|
|
|
|
|
"│ features │ │ │ ╭───┬─────╮ │ │",
|
|
|
|
|
"│ │ │ plugin │ │ 0 │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ plu │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ gin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ cli │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ /pl │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ugi │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ n │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ par │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ser │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ /pl │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ugi │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ n │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ com │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ man │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ d/p │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ lug │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ in │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ pro │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ toc │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ol/ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ plu │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ gin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ eng │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ine │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ /pl │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ugi │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ n │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ extra │ │ 0 │ def │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ │ │ aul │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ default │ │ 0 │ plu │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ gin │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ whi │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ch- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ sup │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ por │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ tra │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ sh- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ sup │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ por │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ sql │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ite │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────╮ │ │",
|
|
|
|
|
"│ │ │ stable │ │ 0 │ def │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ aul │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ t │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ ╰───┴─────╯ │ │",
|
|
|
|
|
"│ │ │ wasi │ [list 0 │ │",
|
|
|
|
|
"│ │ │ │ items] │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────╮ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ static-link-openssl │ │ 0 │ dep │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ :op │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ens │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ sl │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬─────╮ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ which-support │ │ 0 │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ com │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ man │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ d/w │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ hic │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ h-s │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ upp │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ort │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────╯ │ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ │ ╭───┬─────╮ │ │",
|
|
|
|
|
"│ │ │ trash-support │ │ 0 │ nu- │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ com │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ man │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ d/t │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ras │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ h-s │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ upp │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ort │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴─────╯ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╰─────────────────────┴─────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───┬──────┬─────────────╮ │",
|
|
|
|
|
"│ bin │ │ # │ name │ path │ │",
|
|
|
|
|
"│ │ ├───┼──────┼─────────────┤ │",
|
|
|
|
|
"│ │ │ 0 │ nu │ src/main.rs │ │",
|
|
|
|
|
"│ │ ╰───┴──────┴─────────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────┬───────────────────────╮ │",
|
|
|
|
|
"│ patch │ │ │ ╭──────────┬────────╮ │ │",
|
|
|
|
|
"│ │ │ crates-io │ │ reedline │ {recor │ │ │",
|
2023-06-12 00:33:54 +02:00
|
|
|
|
"│ │ │ │ │ │ d 2 fi │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ elds} │ │ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ │ │ ╰──────────┴────────╯ │ │",
|
|
|
|
|
"│ │ ╰───────────┴───────────────────────╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ ╭───┬────────────┬─────────╮ │",
|
|
|
|
|
"│ bench │ │ # │ name │ harness │ │",
|
|
|
|
|
"│ │ ├───┼────────────┼─────────┤ │",
|
|
|
|
|
"│ │ │ 0 │ benchmarks │ false │ │",
|
|
|
|
|
"│ │ ╰───┴────────────┴─────────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"╰──────────────────┴───────────────────────────────────────╯",
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
assert_eq!(actual.out, expected);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
|
|
|
|
cwd: dirs.test(), pipeline(
|
|
|
|
|
"open sample.toml | table --expand --width=40"
|
|
|
|
|
));
|
|
|
|
|
|
2023-06-12 00:33:54 +02:00
|
|
|
|
_print_lines(&actual.out, 40);
|
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
let expected = join_lines([
|
|
|
|
|
"╭──────────────────┬───────────────────╮",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ package │ {record 13 │",
|
|
|
|
|
"│ │ fields} │",
|
|
|
|
|
"│ │ ╭─────────┬─────╮ │",
|
|
|
|
|
"│ workspace │ │ members │ [li │ │",
|
|
|
|
|
"│ │ │ │ st │ │",
|
|
|
|
|
"│ │ │ │ 13 │ │",
|
|
|
|
|
"│ │ │ │ ite │ │",
|
|
|
|
|
"│ │ │ │ ms] │ │",
|
|
|
|
|
"│ │ ╰─────────┴─────╯ │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ dependencies │ {record 13 │",
|
|
|
|
|
"│ │ fields} │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ target │ {record 3 fields} │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ dev-dependencies │ {record 9 fields} │",
|
|
|
|
|
"│ features │ {record 8 fields} │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ bin │ [table 1 row] │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"│ │ ╭───────────┬───╮ │",
|
|
|
|
|
"│ patch │ │ crates-io │ { │ │",
|
|
|
|
|
"│ │ │ │ r │ │",
|
|
|
|
|
"│ │ │ │ e │ │",
|
|
|
|
|
"│ │ │ │ c │ │",
|
|
|
|
|
"│ │ │ │ o │ │",
|
|
|
|
|
"│ │ │ │ r │ │",
|
|
|
|
|
"│ │ │ │ d │ │",
|
|
|
|
|
"│ │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ 1 │ │",
|
|
|
|
|
"│ │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ f │ │",
|
|
|
|
|
"│ │ │ │ i │ │",
|
|
|
|
|
"│ │ │ │ e │ │",
|
|
|
|
|
"│ │ │ │ l │ │",
|
|
|
|
|
"│ │ │ │ d │ │",
|
|
|
|
|
"│ │ │ │ } │ │",
|
|
|
|
|
"│ │ ╰───────────┴───╯ │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ bench │ [table 1 row] │",
|
2023-01-26 21:06:17 +01:00
|
|
|
|
"╰──────────────────┴───────────────────╯",
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
assert_eq!(actual.out, expected);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2023-02-13 00:28:42 +01:00
|
|
|
|
#[test]
|
|
|
|
|
fn table_expande_with_no_header_internally_0() {
|
2023-09-06 20:22:12 +02:00
|
|
|
|
let nu_value = r##"{ "config ": { "ls": { "use_ls_colors": true, "clickable_links": false }, "rm": { "always_trash": false }, "cd": { "abbreviations": false }, "table": { "mode": "rounded", "index_mode": "always", "trim": { "methodology": "wrapping", "wrapping_try_keep_words": true, "truncating_suffix": "..." } }, "explore": { "help_banner": true, "exit_esc": true, "command_bar_text": "#C4C9C6", "status_bar_background": { "fg": "#1D1F21", "bg": "#C4C9C6" }, "highlight": { "bg": "yellow", "fg": "black" }, "status": {}, "try": {}, "table": { "split_line": "#404040", "cursor": true, "line_index": true, "line_shift": true, "line_head_top": true, "line_head_bottom": true, "show_head": true, "show_index": true }, "config": { "cursor_color": { "bg": "yellow", "fg": "black" } } }, "history": { "max_size": 10000, "sync_on_enter": true, "file_format": "plaintext" }, "completions": { "case_sensitive": false, "quick": true, "partial": true, "algorithm": "prefix", "external": { "enable": true, "max_results": 100, "completer": null } }, "filesize": { "metric": true, "format": "auto" }, "cursor_shape": { "emacs": "line", "vi_insert": "block", "vi_normal": "underscore" }, "color_config": { "separator": "white", "leading_trailing_space_bg": { "attr": "n" }, "header": "green_bold", "empty": "blue", "bool": null, "int": "white", "filesize": null, "duration": "white", "date": null, "range": "white", "float": "white", "string": "white", "nothing": "white", "binary": "white", "cell-path": "white", "row_index": "green_bold", "record": "white", "list": "white", "block": "white", "hints": "dark_gray", "search_result": {"fg": "white", "bg": "red"}, "shape_and": "purple_bold", "shape_binary": "purple_bold", "shape_block": "blue_bold", "shape_bool": "light_cyan", "shape_custom": "green", "shape_datetime": "cyan_bold", "shape_directory": "cyan", "shape_external": "cyan", "shape_externalarg": "green_bold", "shape_filepath": "cyan", "shape_flag": "blue_bold", "shape_float": "purple_bold", "shape_garbage": { "fg": "#FFFFFF", "bg": "#FF0000", "attr": "b" }, "shape_globpattern": "cyan_bold", "shape_int": "purple_bold", "shape_internalcall": "cyan_bold", "shape_list": "cyan_bold", "shape_literal": "blue", "shape_matching_brackets": { "attr": "u" }, "shape_nothing": "light_cyan", "shape_operator": "yellow", "shape_or": "purple_bold", "shape_pipe": "purple_bold", "shape_range": "yellow_bold", "shape_record": "cyan_bold", "shape_redirection": "purple_bold", "shape_signature": "green_bold", "shape_string": "green", "shape_string_interpolation": "cyan_bold", "shape_table": "blue_bold", "shape_variable": "purple" }, "use_grid_icons": true, "footer_mode": "25", "float_precision": 2, "use_ansi_coloring": true, "edit_mode": "emacs", "shell_integration": true, "show_banner": true, "render_right_prompt_on_last_line": false, "hooks": { "pre_prompt": [ null ], "pre_execution": [ null ], "env_change": { "PWD": [ null ] }, "display_output": null }, "menus": [ { "name": "completion_menu", "only_buffer_difference": false, "marker": "| ", "type": { "layout": "columnar", "columns": 4, "col_width": 20, "col_padding": 2 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "history_menu", "only_buffer_difference": true, "marker": "? ", "type": { "layout": "list", "page_size": 10 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "help_menu", "only_buffer_difference": true, "marker": "? ", "type": { "layout": "description", "columns": 4, "col_width": 20, "col_padding": 2, "selection_rows": 4, "description_rows": 10 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "commands_menu", "only_buffer_difference": false, "marker": "# ", "type": { "layout": "columnar", "columns": 4, "col_width": 20, "col_padding": 2 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" }, "source": null }, { "name": "vars_menu", "only_buffer_difference": true, "marker": "# ", "t
|
2023-02-13 00:28:42 +01:00
|
|
|
|
|
|
|
|
|
let actual = nu!(format!("{} | table --expand --width 141", nu_value.trim()));
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
join_lines([
|
|
|
|
|
"╭────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮",
|
|
|
|
|
"│ │ ╭──────────────────────────────────┬───────────────────────────────────────────────────────────────────────────────╮ │",
|
|
|
|
|
"│ config │ │ │ ╭─────────────────┬───────╮ │ │",
|
|
|
|
|
"│ │ │ ls │ │ use_ls_colors │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ clickable_links │ false │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────────────┴───────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────────┬───────╮ │ │",
|
|
|
|
|
"│ │ │ rm │ │ always_trash │ false │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────────┴───────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───────────────┬───────╮ │ │",
|
|
|
|
|
"│ │ │ cd │ │ abbreviations │ false │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───────────────┴───────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────┬────────────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ table │ │ mode │ rounded │ │ │",
|
|
|
|
|
"│ │ │ │ │ index_mode │ always │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭─────────────────────────┬──────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ trim │ │ methodology │ wrapping │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ wrapping_try_keep_words │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ truncating_suffix │ ... │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰─────────────────────────┴──────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────┴────────────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───────────────────────────────┬───────────────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ explore │ │ help_banner │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ exit_esc │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ command_bar_text │ #C4C9C6 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭────┬─────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ status_bar_background │ │ fg │ #1D1F21 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ bg │ #C4C9C6 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰────┴─────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭────┬────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ highlight │ │ bg │ yellow │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ fg │ black │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰────┴────────╯ │ │ │",
|
2023-02-22 17:18:33 +01:00
|
|
|
|
"│ │ │ │ │ status │ {record 0 fields} │ │ │",
|
|
|
|
|
"│ │ │ │ │ try │ {record 0 fields} │ │ │",
|
2023-02-13 00:28:42 +01:00
|
|
|
|
"│ │ │ │ │ │ ╭──────────────────┬─────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ table │ │ split_line │ #404040 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ cursor │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ line_index │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ line_shift │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ line_head_top │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ line_head_bottom │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ show_head │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ show_index │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────────────────┴─────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭──────────────┬─────────────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ config │ │ │ ╭────┬────────╮ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ cursor_color │ │ bg │ yellow │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ fg │ black │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ╰────┴────────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────────────┴─────────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───────────────────────────────┴───────────────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───────────────┬───────────╮ │ │",
|
|
|
|
|
"│ │ │ history │ │ max_size │ 10000 │ │ │",
|
|
|
|
|
"│ │ │ │ │ sync_on_enter │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ file_format │ plaintext │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───────────────┴───────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────────┬────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ completions │ │ case_sensitive │ false │ │ │",
|
|
|
|
|
"│ │ │ │ │ quick │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ partial │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ algorithm │ prefix │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭─────────────┬──────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ external │ │ enable │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ max_results │ 100 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ completer │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰─────────────┴──────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────────┴────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────┬──────╮ │ │",
|
|
|
|
|
"│ │ │ filesize │ │ metric │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ format │ auto │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────┴──────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───────────┬────────────╮ │ │",
|
|
|
|
|
"│ │ │ cursor_shape │ │ emacs │ line │ │ │",
|
|
|
|
|
"│ │ │ │ │ vi_insert │ block │ │ │",
|
|
|
|
|
"│ │ │ │ │ vi_normal │ underscore │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───────────┴────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────────────────────┬────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ color_config │ │ separator │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭──────┬───╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ leading_trailing_space_bg │ │ attr │ n │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────┴───╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ header │ green_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ empty │ blue │ │ │",
|
|
|
|
|
"│ │ │ │ │ bool │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ int │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ filesize │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ duration │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ date │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ range │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ float │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ string │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ nothing │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ binary │ white │ │ │",
|
2023-09-06 20:22:12 +02:00
|
|
|
|
"│ │ │ │ │ cell-path │ white │ │ │",
|
2023-02-13 00:28:42 +01:00
|
|
|
|
"│ │ │ │ │ row_index │ green_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ record │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ list │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ block │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ hints │ dark_gray │ │ │",
|
2023-06-01 22:51:18 +02:00
|
|
|
|
"│ │ │ │ │ │ ╭────┬───────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ search_result │ │ fg │ white │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ bg │ red │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰────┴───────╯ │ │ │",
|
2023-02-13 00:28:42 +01:00
|
|
|
|
"│ │ │ │ │ shape_and │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_binary │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_block │ blue_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_bool │ light_cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_custom │ green │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_datetime │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_directory │ cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_external │ cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_externalarg │ green_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_filepath │ cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_flag │ blue_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_float │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭──────┬─────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_garbage │ │ fg │ #FFFFFF │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ bg │ #FF0000 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ attr │ b │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────┴─────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_globpattern │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_int │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_internalcall │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_list │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_literal │ blue │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭──────┬───╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_matching_brackets │ │ attr │ u │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────┴───╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_nothing │ light_cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_operator │ yellow │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_or │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_pipe │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_range │ yellow_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_record │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_redirection │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_signature │ green_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_string │ green │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_string_interpolation │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_table │ blue_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_variable │ purple │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────────────────────┴────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ use_grid_icons │ true │ │",
|
|
|
|
|
"│ │ │ footer_mode │ 25 │ │",
|
|
|
|
|
"│ │ │ float_precision │ 2 │ │",
|
|
|
|
|
"│ │ │ use_ansi_coloring │ true │ │",
|
|
|
|
|
"│ │ │ edit_mode │ emacs │ │",
|
|
|
|
|
"│ │ │ shell_integration │ true │ │",
|
|
|
|
|
"│ │ │ show_banner │ true │ │",
|
|
|
|
|
"│ │ │ render_right_prompt_on_last_line │ false │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────────┬────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ hooks │ │ │ ╭───┬──╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ pre_prompt │ │ 0 │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴──╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭───┬──╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ pre_execution │ │ 0 │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴──╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭─────┬──────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ env_change │ │ │ ╭───┬──╮ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ PWD │ │ 0 │ │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ╰───┴──╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰─────┴──────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ display_output │ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────────┴────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬───────────────────────────┬────────────────────────┬────────┬─────╮ │ │",
|
|
|
|
|
"│ │ │ menus │ │ # │ name │ only_buffer_difference │ marker │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ ├───┼───────────────────────────┼────────────────────────┼────────┼─────┤ │ │",
|
|
|
|
|
"│ │ │ │ │ 0 │ completion_menu │ false │ | │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ history_menu │ true │ ? │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ help_menu │ true │ ? │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ commands_menu │ false │ # │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ vars_menu │ true │ # │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ commands_with_description │ true │ # │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴───────────────────────────┴────────────────────────┴────────┴─────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬───────────────┬─────╮ │ │",
|
|
|
|
|
"│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼───────────────┼─────┤ │ │",
|
|
|
|
|
"│ │ │ │ │ 0 │ completion_menu │ none │ tab │ ╭───┬───────╮ │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ rmal │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ sert │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ ╭───┬───────╮ │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ rmal │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ sert │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ ╭───┬───────╮ │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ rmal │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ sert │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 7 │ kill-line │ control │ char_k │ ╭───┬───────╮ │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ rmal │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ sert │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ ╭───┬───────╮ │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ rmal │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ sert │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ ╭───┬───────╮ │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ rmal │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ sert │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ ╭───┬───────╮ │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 0 │ emacs │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 1 │ vi_no │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ rmal │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ 2 │ vi_in │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ │ │ sert │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ ╰───┴───────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴───────────────┴─────╯ │ │",
|
|
|
|
|
"│ │ ╰──────────────────────────────────┴───────────────────────────────────────────────────────────────────────────────╯ │",
|
|
|
|
|
"╰────────────────────┴──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯",
|
|
|
|
|
])
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expande_with_no_header_internally_1() {
|
2023-09-06 20:22:12 +02:00
|
|
|
|
let nu_value = r##"{ "config ": { "ls": { "use_ls_colors": true, "clickable_links": false }, "rm": { "always_trash": false }, "cd": { "abbreviations": false }, "table": { "mode": "rounded", "index_mode": "always", "trim": { "methodology": "wrapping", "wrapping_try_keep_words": true, "truncating_suffix": "..." } }, "explore": { "help_banner": true, "exit_esc": true, "command_bar_text": "#C4C9C6", "status_bar_background": { "fg": "#1D1F21", "bg": "#C4C9C6" }, "highlight": { "bg": "yellow", "fg": "black" }, "status": {}, "try": {}, "table": { "split_line": "#404040", "cursor": true, "line_index": true, "line_shift": true, "line_head_top": true, "line_head_bottom": true, "show_head": true, "show_index": true }, "config": { "cursor_color": { "bg": "yellow", "fg": "black" } } }, "history": { "max_size": 10000, "sync_on_enter": true, "file_format": "plaintext" }, "completions": { "case_sensitive": false, "quick": true, "partial": true, "algorithm": "prefix", "external": { "enable": true, "max_results": 100, "completer": null } }, "filesize": { "metric": true, "format": "auto" }, "cursor_shape": { "emacs": "line", "vi_insert": "block", "vi_normal": "underscore" }, "color_config": { "separator": "white", "leading_trailing_space_bg": { "attr": "n" }, "header": "green_bold", "empty": "blue", "bool": null, "int": "white", "filesize": null, "duration": "white", "date": null, "range": "white", "float": "white", "string": "white", "nothing": "white", "binary": "white", "cell-path": "white", "row_index": "green_bold", "record": "white", "list": "white", "block": "white", "hints": "dark_gray", "search_result": {"fg": "white", "bg": "red"}, "shape_and": "purple_bold", "shape_binary": "purple_bold", "shape_block": "blue_bold", "shape_bool": "light_cyan", "shape_custom": "green", "shape_datetime": "cyan_bold", "shape_directory": "cyan", "shape_external": "cyan", "shape_externalarg": "green_bold", "shape_filepath": "cyan", "shape_flag": "blue_bold", "shape_float": "purple_bold", "shape_garbage": { "fg": "#FFFFFF", "bg": "#FF0000", "attr": "b" }, "shape_globpattern": "cyan_bold", "shape_int": "purple_bold", "shape_internalcall": "cyan_bold", "shape_list": "cyan_bold", "shape_literal": "blue", "shape_matching_brackets": { "attr": "u" }, "shape_nothing": "light_cyan", "shape_operator": "yellow", "shape_or": "purple_bold", "shape_pipe": "purple_bold", "shape_range": "yellow_bold", "shape_record": "cyan_bold", "shape_redirection": "purple_bold", "shape_signature": "green_bold", "shape_string": "green", "shape_string_interpolation": "cyan_bold", "shape_table": "blue_bold", "shape_variable": "purple" }, "use_grid_icons": true, "footer_mode": "25", "float_precision": 2, "use_ansi_coloring": true, "edit_mode": "emacs", "shell_integration": true, "show_banner": true, "render_right_prompt_on_last_line": false, "hooks": { "pre_prompt": [ null ], "pre_execution": [ null ], "env_change": { "PWD": [ null ] }, "display_output": null }, "menus": [ { "name": "completion_menu", "only_buffer_difference": false, "marker": "| ", "type": { "layout": "columnar", "columns": 4, "col_width": 20, "col_padding": 2 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "history_menu", "only_buffer_difference": true, "marker": "? ", "type": { "layout": "list", "page_size": 10 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "help_menu", "only_buffer_difference": true, "marker": "? ", "type": { "layout": "description", "columns": 4, "col_width": 20, "col_padding": 2, "selection_rows": 4, "description_rows": 10 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" } }, { "name": "commands_menu", "only_buffer_difference": false, "marker": "# ", "type": { "layout": "columnar", "columns": 4, "col_width": 20, "col_padding": 2 }, "style": { "text": "green", "selected_text": "green_reverse", "description_text": "yellow" }, "source": null }, { "name": "vars_menu", "only_buffer_difference": true, "marker": "# ", "t
|
2023-02-13 00:28:42 +01:00
|
|
|
|
|
|
|
|
|
let actual = nu!(format!("{} | table --expand --width 136", nu_value.trim()));
|
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
join_lines([
|
|
|
|
|
"╭────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮",
|
|
|
|
|
"│ │ ╭──────────────────────────────────┬──────────────────────────────────────────────────────────────────────────╮ │",
|
|
|
|
|
"│ config │ │ │ ╭─────────────────┬───────╮ │ │",
|
|
|
|
|
"│ │ │ ls │ │ use_ls_colors │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ clickable_links │ false │ │ │",
|
|
|
|
|
"│ │ │ │ ╰─────────────────┴───────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭──────────────┬───────╮ │ │",
|
|
|
|
|
"│ │ │ rm │ │ always_trash │ false │ │ │",
|
|
|
|
|
"│ │ │ │ ╰──────────────┴───────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───────────────┬───────╮ │ │",
|
|
|
|
|
"│ │ │ cd │ │ abbreviations │ false │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───────────────┴───────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────┬────────────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ table │ │ mode │ rounded │ │ │",
|
|
|
|
|
"│ │ │ │ │ index_mode │ always │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭─────────────────────────┬──────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ trim │ │ methodology │ wrapping │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ wrapping_try_keep_words │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ truncating_suffix │ ... │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰─────────────────────────┴──────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────┴────────────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────────────────────┬─────────────────────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ explore │ │ help_banner │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ exit_esc │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ command_bar_text │ #C4C9C6 │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭────┬─────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ status_bar_background │ │ fg │ #1D1F21 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ bg │ #C4C9C6 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰────┴─────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭────┬────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ highlight │ │ bg │ yellow │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ fg │ black │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰────┴────────╯ │ │ │",
|
2023-02-22 17:18:33 +01:00
|
|
|
|
"│ │ │ │ │ status │ {record 0 fields} │ │ │",
|
|
|
|
|
"│ │ │ │ │ try │ {record 0 fields} │ │ │",
|
2023-02-13 00:28:42 +01:00
|
|
|
|
"│ │ │ │ │ │ ╭──────────────────┬─────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ table │ │ split_line │ #404040 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ cursor │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ line_index │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ line_shift │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ line_head_top │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ line_head_bottom │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ show_head │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ show_index │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────────────────┴─────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭──────────────┬─────────────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ config │ │ │ ╭────┬────────╮ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ cursor_color │ │ bg │ yellow │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ fg │ black │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ╰────┴────────╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────────────┴─────────────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────────────────────┴─────────────────────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───────────────┬───────────╮ │ │",
|
|
|
|
|
"│ │ │ history │ │ max_size │ 10000 │ │ │",
|
|
|
|
|
"│ │ │ │ │ sync_on_enter │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ file_format │ plaintext │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───────────────┴───────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────────┬────────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ completions │ │ case_sensitive │ false │ │ │",
|
|
|
|
|
"│ │ │ │ │ quick │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ partial │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ algorithm │ prefix │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭─────────────┬──────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ external │ │ enable │ true │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ max_results │ 100 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ completer │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰─────────────┴──────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────────┴────────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────┬──────╮ │ │",
|
|
|
|
|
"│ │ │ filesize │ │ metric │ true │ │ │",
|
|
|
|
|
"│ │ │ │ │ format │ auto │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────┴──────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───────────┬────────────╮ │ │",
|
|
|
|
|
"│ │ │ cursor_shape │ │ emacs │ line │ │ │",
|
|
|
|
|
"│ │ │ │ │ vi_insert │ block │ │ │",
|
|
|
|
|
"│ │ │ │ │ vi_normal │ underscore │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───────────┴────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────────────────────┬────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ color_config │ │ separator │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭──────┬───╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ leading_trailing_space_bg │ │ attr │ n │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────┴───╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ header │ green_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ empty │ blue │ │ │",
|
|
|
|
|
"│ │ │ │ │ bool │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ int │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ filesize │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ duration │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ date │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ range │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ float │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ string │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ nothing │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ binary │ white │ │ │",
|
2023-09-06 20:22:12 +02:00
|
|
|
|
"│ │ │ │ │ cell-path │ white │ │ │",
|
2023-02-13 00:28:42 +01:00
|
|
|
|
"│ │ │ │ │ row_index │ green_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ record │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ list │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ block │ white │ │ │",
|
|
|
|
|
"│ │ │ │ │ hints │ dark_gray │ │ │",
|
2023-06-01 22:51:18 +02:00
|
|
|
|
"│ │ │ │ │ │ ╭────┬───────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ search_result │ │ fg │ white │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ bg │ red │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰────┴───────╯ │ │ │",
|
2023-02-13 00:28:42 +01:00
|
|
|
|
"│ │ │ │ │ shape_and │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_binary │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_block │ blue_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_bool │ light_cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_custom │ green │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_datetime │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_directory │ cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_external │ cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_externalarg │ green_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_filepath │ cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_flag │ blue_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_float │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭──────┬─────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_garbage │ │ fg │ #FFFFFF │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ bg │ #FF0000 │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ attr │ b │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────┴─────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_globpattern │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_int │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_internalcall │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_list │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_literal │ blue │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭──────┬───╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_matching_brackets │ │ attr │ u │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰──────┴───╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_nothing │ light_cyan │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_operator │ yellow │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_or │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_pipe │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_range │ yellow_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_record │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_redirection │ purple_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_signature │ green_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_string │ green │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_string_interpolation │ cyan_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_table │ blue_bold │ │ │",
|
|
|
|
|
"│ │ │ │ │ shape_variable │ purple │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────────────────────┴────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ use_grid_icons │ true │ │",
|
|
|
|
|
"│ │ │ footer_mode │ 25 │ │",
|
|
|
|
|
"│ │ │ float_precision │ 2 │ │",
|
|
|
|
|
"│ │ │ use_ansi_coloring │ true │ │",
|
|
|
|
|
"│ │ │ edit_mode │ emacs │ │",
|
|
|
|
|
"│ │ │ shell_integration │ true │ │",
|
|
|
|
|
"│ │ │ show_banner │ true │ │",
|
|
|
|
|
"│ │ │ render_right_prompt_on_last_line │ false │ │",
|
|
|
|
|
"│ │ │ │ ╭────────────────┬────────────────────╮ │ │",
|
|
|
|
|
"│ │ │ hooks │ │ │ ╭───┬──╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ pre_prompt │ │ 0 │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴──╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭───┬──╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ pre_execution │ │ 0 │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰───┴──╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╭─────┬──────────╮ │ │ │",
|
|
|
|
|
"│ │ │ │ │ env_change │ │ │ ╭───┬──╮ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ PWD │ │ 0 │ │ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ ╰───┴──╯ │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ ╰─────┴──────────╯ │ │ │",
|
|
|
|
|
"│ │ │ │ │ display_output │ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────────────────┴────────────────────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭───┬───────────────────────────┬────────────────────────┬─────╮ │ │",
|
|
|
|
|
"│ │ │ menus │ │ # │ name │ only_buffer_difference │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ ├───┼───────────────────────────┼────────────────────────┼─────┤ │ │",
|
|
|
|
|
"│ │ │ │ │ 0 │ completion_menu │ false │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ history_menu │ true │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ help_menu │ true │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ commands_menu │ false │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ vars_menu │ true │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ commands_with_description │ true │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ ╰───┴───────────────────────────┴────────────────────────┴─────╯ │ │",
|
|
|
|
|
"│ │ │ │ ╭────┬───────────────────────────┬──────────┬─────────┬──────────┬─────╮ │ │",
|
|
|
|
|
"│ │ │ keybindings │ │ # │ name │ modifier │ keycode │ mode │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ ├────┼───────────────────────────┼──────────┼─────────┼──────────┼─────┤ │ │",
|
|
|
|
|
"│ │ │ │ │ 0 │ completion_menu │ none │ tab │ [list 3 │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ items] │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 1 │ completion_previous │ shift │ backtab │ [list 3 │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ items] │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 2 │ history_menu │ control │ char_r │ emacs │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 3 │ next_page │ control │ char_x │ emacs │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 4 │ undo_or_previous_page │ control │ char_z │ emacs │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 5 │ yank │ control │ char_y │ emacs │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ 6 │ unix-line-discard │ control │ char_u │ [list 3 │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ items] │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 7 │ kill-line │ control │ char_k │ [list 3 │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ items] │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 8 │ commands_menu │ control │ char_t │ [list 3 │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ items] │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 9 │ vars_menu │ alt │ char_o │ [list 3 │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ items] │ │ │ │",
|
|
|
|
|
"│ │ │ │ │ 10 │ commands_with_description │ control │ char_s │ [list 3 │ ... │ │ │",
|
|
|
|
|
"│ │ │ │ │ │ │ │ │ items] │ │ │ │",
|
|
|
|
|
"│ │ │ │ ╰────┴───────────────────────────┴──────────┴─────────┴──────────┴─────╯ │ │",
|
|
|
|
|
"│ │ ╰──────────────────────────────────┴──────────────────────────────────────────────────────────────────────────╯ │",
|
|
|
|
|
"╰────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯",
|
|
|
|
|
])
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
#[test]
|
|
|
|
|
fn test_collapse_big_0() {
|
|
|
|
|
Playground::setup("test_expand_big_0", |dirs, sandbox| {
|
2024-05-04 02:53:15 +02:00
|
|
|
|
sandbox.with_files(&[FileWithContent(
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"sample.toml",
|
|
|
|
|
r#"
|
|
|
|
|
[package]
|
|
|
|
|
authors = ["The Nushell Project Developers"]
|
|
|
|
|
default-run = "nu"
|
|
|
|
|
description = "A new type of shell"
|
|
|
|
|
documentation = "https://www.nushell.sh/book/"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
exclude = ["images"]
|
|
|
|
|
homepage = "https://www.nushell.sh"
|
|
|
|
|
license = "MIT"
|
|
|
|
|
name = "nu"
|
|
|
|
|
repository = "https://github.com/nushell/nushell"
|
|
|
|
|
rust-version = "1.60"
|
|
|
|
|
version = "0.74.1"
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[package.metadata.binstall]
|
|
|
|
|
pkg-url = "{ repo }/releases/download/{ version }/{ name }-{ version }-{ target }.{ archive-format }"
|
|
|
|
|
pkg-fmt = "tgz"
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
|
|
|
|
|
pkg-fmt = "zip"
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[workspace]
|
|
|
|
|
members = [
|
|
|
|
|
"crates/nu-cli",
|
|
|
|
|
"crates/nu-engine",
|
|
|
|
|
"crates/nu-parser",
|
|
|
|
|
"crates/nu-system",
|
|
|
|
|
"crates/nu-command",
|
|
|
|
|
"crates/nu-protocol",
|
|
|
|
|
"crates/nu-plugin",
|
|
|
|
|
"crates/nu_plugin_inc",
|
|
|
|
|
"crates/nu_plugin_gstat",
|
|
|
|
|
"crates/nu_plugin_example",
|
|
|
|
|
"crates/nu_plugin_query",
|
|
|
|
|
"crates/nu_plugin_custom_values",
|
|
|
|
|
"crates/nu-utils",
|
|
|
|
|
]
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[dependencies]
|
|
|
|
|
chrono = { version = "0.4.23", features = ["serde"] }
|
|
|
|
|
crossterm = "0.24.0"
|
|
|
|
|
ctrlc = "3.2.1"
|
|
|
|
|
log = "0.4"
|
|
|
|
|
miette = { version = "5.5.0", features = ["fancy-no-backtrace"] }
|
|
|
|
|
nu-ansi-term = "0.46.0"
|
|
|
|
|
nu-cli = { path = "./crates/nu-cli", version = "0.74.1" }
|
|
|
|
|
nu-engine = { path = "./crates/nu-engine", version = "0.74.1" }
|
|
|
|
|
reedline = { version = "0.14.0", features = ["bashisms", "sqlite"] }
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
rayon = "1.6.1"
|
|
|
|
|
is_executable = "1.0.1"
|
|
|
|
|
simplelog = "0.12.0"
|
|
|
|
|
time = "0.3.12"
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[target.'cfg(not(target_os = "windows"))'.dependencies]
|
|
|
|
|
# Our dependencies don't use OpenSSL on Windows
|
|
|
|
|
openssl = { version = "0.10.38", features = ["vendored"], optional = true }
|
|
|
|
|
signal-hook = { version = "0.3.14", default-features = false }
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[target.'cfg(windows)'.build-dependencies]
|
|
|
|
|
winres = "0.1"
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[target.'cfg(target_family = "unix")'.dependencies]
|
|
|
|
|
nix = { version = "0.25", default-features = false, features = ["signal", "process", "fs", "term"] }
|
|
|
|
|
atty = "0.2"
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[dev-dependencies]
|
|
|
|
|
nu-test-support = { path = "./crates/nu-test-support", version = "0.74.1" }
|
|
|
|
|
tempfile = "3.2.0"
|
|
|
|
|
assert_cmd = "2.0.2"
|
|
|
|
|
criterion = "0.4"
|
|
|
|
|
pretty_assertions = "1.0.0"
|
|
|
|
|
serial_test = "0.10.0"
|
|
|
|
|
hamcrest2 = "0.3.0"
|
|
|
|
|
rstest = { version = "0.15.0", default-features = false }
|
|
|
|
|
itertools = "0.10.3"
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
[features]
|
|
|
|
|
plugin = [
|
|
|
|
|
"nu-plugin",
|
|
|
|
|
"nu-cli/plugin",
|
|
|
|
|
"nu-parser/plugin",
|
|
|
|
|
"nu-command/plugin",
|
|
|
|
|
"nu-protocol/plugin",
|
|
|
|
|
"nu-engine/plugin",
|
|
|
|
|
]
|
|
|
|
|
# extra used to be more useful but now it's the same as default. Leaving it in for backcompat with existing build scripts
|
|
|
|
|
extra = ["default"]
|
|
|
|
|
default = ["plugin", "which-support", "trash-support", "sqlite"]
|
|
|
|
|
stable = ["default"]
|
|
|
|
|
wasi = []
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
# Enable to statically link OpenSSL; otherwise the system version will be used. Not enabled by default because it takes a while to build
|
|
|
|
|
static-link-openssl = ["dep:openssl"]
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
# Stable (Default)
|
|
|
|
|
which-support = ["nu-command/which-support"]
|
|
|
|
|
trash-support = ["nu-command/trash-support"]
|
|
|
|
|
|
|
|
|
|
# Main nu binary
|
|
|
|
|
[[bin]]
|
|
|
|
|
name = "nu"
|
|
|
|
|
path = "src/main.rs"
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
# To use a development version of a dependency please use a global override here
|
|
|
|
|
# changing versions in each sub-crate of the workspace is tedious
|
|
|
|
|
[patch.crates-io]
|
|
|
|
|
reedline = { git = "https://github.com/nushell/reedline.git", branch = "main" }
|
2023-06-23 13:17:10 +02:00
|
|
|
|
|
2023-04-26 20:56:10 +02:00
|
|
|
|
# Criterion benchmarking setup
|
|
|
|
|
# Run all benchmarks with `cargo bench`
|
|
|
|
|
# Run individual benchmarks like `cargo bench -- <regex>` e.g. `cargo bench -- parse`
|
|
|
|
|
[[bench]]
|
|
|
|
|
name = "benchmarks"
|
|
|
|
|
harness = false
|
|
|
|
|
"#,
|
|
|
|
|
)]);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
|
|
|
|
cwd: dirs.test(), pipeline(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"open sample.toml | table --width=80 --collapse"
|
2023-04-26 20:56:10 +02:00
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
_print_lines(&actual.out, 80);
|
|
|
|
|
|
|
|
|
|
let expected = join_lines([
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"╭──────────────────┬───────────────┬───────────────────────────────────────────╮",
|
|
|
|
|
"│ package │ authors │ The Nushell Project Developers │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ default-run │ nu │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ description │ A new type of shell │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ documentation │ https://www.nushell.sh/book/ │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ edition │ 2021 │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ exclude │ images │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ homepage │ https://www.nushell.sh │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ license │ MIT │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ name │ nu │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ repository │ https://github.com/nushell/nushell │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ rust-version │ 1.60 │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ version │ 0.74.1 │",
|
|
|
|
|
"│ ├───────────────┼──────────┬───────────┬────────────────────┤",
|
|
|
|
|
"│ │ metadata │ binstall │ pkg-url │ { repo }/releases/ │",
|
|
|
|
|
"│ │ │ │ │ download/{ v │",
|
|
|
|
|
"│ │ │ │ │ ersion │",
|
|
|
|
|
"│ │ │ │ │ }/{ name }-{ vers │",
|
|
|
|
|
"│ │ │ │ │ ion }- │",
|
|
|
|
|
"│ │ │ │ │ { target }.{ │",
|
|
|
|
|
"│ │ │ │ │ archive-format } │",
|
|
|
|
|
"│ │ │ ├───────────┼────────────────────┤",
|
|
|
|
|
"│ │ │ │ pkg-fmt │ tgz │",
|
|
|
|
|
"│ │ │ ├───────────┼────────────────────┤",
|
|
|
|
|
"│ │ │ │ overrides │ ... │",
|
|
|
|
|
"├──────────────────┼─────────┬─────┴──────────┴───────────┴────────────────────┤",
|
|
|
|
|
"│ workspace │ members │ crates/nu-cli │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-engine │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-parser │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-system │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-command │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-protocol │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-plugin │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_inc │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_gstat │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_example │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_query │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_custom_values │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-utils │",
|
|
|
|
|
"├──────────────────┼─────────┴─────┬──────────┬────────────────────────────────┤",
|
|
|
|
|
"│ dependencies │ chrono │ version │ 0.4.23 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├──────────┼────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ features │ serde │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├───────────────┼──────────┴────────────────────────────────┤",
|
|
|
|
|
"│ │ crossterm │ 0.24.0 │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ ctrlc │ 3.2.1 │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ log │ 0.4 │",
|
|
|
|
|
"│ ├───────────────┼──────────┬────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ miette │ version │ 5.5.0 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├──────────┼────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ features │ fancy-no-backtrace │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├───────────────┼──────────┴────────────────────────────────┤",
|
|
|
|
|
"│ │ nu-ansi-term │ 0.46.0 │",
|
|
|
|
|
"│ ├───────────────┼─────────┬─────────────────────────────────┤",
|
|
|
|
|
"│ │ nu-cli │ path │ ./crates/nu-cli │",
|
|
|
|
|
"│ │ ├─────────┼─────────────────────────────────┤",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │",
|
|
|
|
|
"│ ├───────────────┼─────────┼─────────────────────────────────┤",
|
|
|
|
|
"│ │ nu-engine │ path │ ./crates/nu-engine │",
|
|
|
|
|
"│ │ ├─────────┼─────────────────────────────────┤",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ ├───────────────┼─────────┴┬────────────────────────────────┤",
|
|
|
|
|
"│ │ reedline │ version │ 0.14.0 │",
|
|
|
|
|
"│ │ ├──────────┼────────────────────────────────┤",
|
|
|
|
|
"│ │ │ features │ bashisms │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ │ ├────────────────────────────────┤",
|
|
|
|
|
"│ │ │ │ sqlite │",
|
|
|
|
|
"│ ├───────────────┼──────────┴────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ rayon │ 1.6.1 │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ is_executable │ 1.0.1 │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ simplelog │ 0.12.0 │",
|
|
|
|
|
"│ ├───────────────┼───────────────────────────────────────────┤",
|
|
|
|
|
"│ │ time │ 0.3.12 │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"├──────────────────┼───────────────┴─────────────────┬──────────────┬──────────┤",
|
|
|
|
|
"│ target │ cfg(not(target_os = \"windows\")) │ dependencies │ ... │",
|
|
|
|
|
"│ │ │ ├──────────┤",
|
|
|
|
|
"│ │ │ │ ... │",
|
|
|
|
|
"│ ├─────────────────────────────────┼──────────────┴──────────┤",
|
|
|
|
|
"│ │ cfg(windows) │ ... │",
|
|
|
|
|
"│ ├─────────────────────────────────┼──────────────┬──────────┤",
|
|
|
|
|
"│ │ cfg(target_family = \"unix\") │ dependencies │ ... │",
|
|
|
|
|
"│ │ │ ├──────────┤",
|
|
|
|
|
"│ │ │ │ ... │",
|
|
|
|
|
"├──────────────────┼───────────────────┬─────────┬───┴──────────────┴──────────┤",
|
|
|
|
|
"│ dev-dependencies │ nu-test-support │ path │ ./crates/nu-test-support │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├─────────┼─────────────────────────────┤",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │",
|
|
|
|
|
"│ ├───────────────────┼─────────┴─────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ tempfile │ 3.2.0 │",
|
|
|
|
|
"│ ├───────────────────┼───────────────────────────────────────┤",
|
|
|
|
|
"│ │ assert_cmd │ 2.0.2 │",
|
|
|
|
|
"│ ├───────────────────┼───────────────────────────────────────┤",
|
|
|
|
|
"│ │ criterion │ 0.4 │",
|
|
|
|
|
"│ ├───────────────────┼───────────────────────────────────────┤",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ pretty_assertions │ 1.0.0 │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ ├───────────────────┼───────────────────────────────────────┤",
|
|
|
|
|
"│ │ serial_test │ 0.10.0 │",
|
|
|
|
|
"│ ├───────────────────┼───────────────────────────────────────┤",
|
|
|
|
|
"│ │ hamcrest2 │ 0.3.0 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├───────────────────┼──────────────────┬────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ rstest │ version │ 0.15.0 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├──────────────────┼────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ default-features │ false │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├───────────────────┼──────────────────┴────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ itertools │ 0.10.3 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"├──────────────────┼───────────────────┴─┬─────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ features │ plugin │ nu-plugin │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├─────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-cli/plugin │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-parser/plugin │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-command/plugin │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-protocol/plugin │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-engine/plugin │",
|
|
|
|
|
"│ ├─────────────────────┼─────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ extra │ default │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├─────────────────────┼─────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ default │ plugin │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ which-support │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ trash-support │",
|
|
|
|
|
"│ │ ├─────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ sqlite │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├─────────────────────┼─────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ stable │ default │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├─────────────────────┼─────────────────────────────────────┤",
|
|
|
|
|
"│ │ wasi │ │",
|
|
|
|
|
"│ ├─────────────────────┼─────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ static-link-openssl │ dep:openssl │",
|
|
|
|
|
"│ ├─────────────────────┼─────────────────────────────────────┤",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ which-support │ nu-command/which-support │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ ├─────────────────────┼─────────────────────────────────────┤",
|
|
|
|
|
"│ │ trash-support │ nu-command/trash-support │",
|
|
|
|
|
"├──────────────────┼──────┬──────────────┴─────────────────────────────────────┤",
|
|
|
|
|
"│ bin │ name │ path │",
|
|
|
|
|
"│ ├──────┼────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ nu │ src/main.rs │",
|
|
|
|
|
"├──────────────────┼──────┴────┬──────────┬────────┬───────────────────────────┤",
|
|
|
|
|
"│ patch │ crates-io │ reedline │ git │ https://github.com/nushel │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ │ │ │ l/reedline.git │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ ├────────┼───────────────────────────┤",
|
|
|
|
|
"│ │ │ │ branch │ main │",
|
|
|
|
|
"├──────────────────┼───────────┴┬─────────┴────────┴───────────────────────────┤",
|
|
|
|
|
"│ bench │ name │ harness │",
|
|
|
|
|
"│ ├────────────┼──────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ benchmarks │ false │",
|
|
|
|
|
"╰──────────────────┴────────────┴──────────────────────────────────────────────╯",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
assert_eq!(actual.out, expected);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
|
|
|
|
cwd: dirs.test(), pipeline(
|
|
|
|
|
"open sample.toml | table --collapse --width=160"
|
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
_print_lines(&actual.out, 111);
|
|
|
|
|
|
|
|
|
|
let expected = join_lines([
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"╭──────────────────┬───────────────┬──────────────────────────────────────────────────────────────────────────╮",
|
|
|
|
|
"│ package │ authors │ The Nushell Project Developers │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ default-run │ nu │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ description │ A new type of shell │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ documentation │ https://www.nushell.sh/book/ │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ edition │ 2021 │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ exclude │ images │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ homepage │ https://www.nushell.sh │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ license │ MIT │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ name │ nu │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ repository │ https://github.com/nushell/nushell │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ rust-version │ 1.60 │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ version │ 0.74.1 │",
|
|
|
|
|
"│ ├───────────────┼──────────┬───────────┬───────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ metadata │ binstall │ pkg-url │ { repo }/releases/download/{ v │",
|
|
|
|
|
"│ │ │ │ │ ersion }/{ name }-{ version }- │",
|
|
|
|
|
"│ │ │ │ │ { target }.{ archive-format } │",
|
|
|
|
|
"│ │ │ ├───────────┼───────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ │ pkg-fmt │ tgz │",
|
|
|
|
|
"│ │ │ ├───────────┼────────────────────────┬─────────┬────────────────┤",
|
|
|
|
|
"│ │ │ │ overrides │ x86_64-pc-windows-msvc │ pkg-fmt │ zip │",
|
|
|
|
|
"├──────────────────┼─────────┬─────┴──────────┴───────────┴────────────────────────┴─────────┴────────────────┤",
|
|
|
|
|
"│ workspace │ members │ crates/nu-cli │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-engine │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-parser │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-system │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-command │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-protocol │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-plugin │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_inc │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_gstat │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_example │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_query │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu_plugin_custom_values │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ crates/nu-utils │",
|
|
|
|
|
"├──────────────────┼─────────┴─────┬──────────┬───────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ dependencies │ chrono │ version │ 0.4.23 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├──────────┼───────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ features │ serde │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ crossterm │ 0.24.0 │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ ctrlc │ 3.2.1 │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ log │ 0.4 │",
|
|
|
|
|
"│ ├───────────────┼──────────┬───────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ miette │ version │ 5.5.0 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├──────────┼───────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ features │ fancy-no-backtrace │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ nu-ansi-term │ 0.46.0 │",
|
|
|
|
|
"│ ├───────────────┼─────────┬────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ nu-cli │ path │ ./crates/nu-cli │",
|
|
|
|
|
"│ │ ├─────────┼────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │",
|
|
|
|
|
"│ ├───────────────┼─────────┼────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ nu-engine │ path │ ./crates/nu-engine │",
|
|
|
|
|
"│ │ ├─────────┼────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ ├───────────────┼─────────┴┬───────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ reedline │ version │ 0.14.0 │",
|
|
|
|
|
"│ │ ├──────────┼───────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ features │ bashisms │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ │ ├───────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ │ sqlite │",
|
|
|
|
|
"│ ├───────────────┼──────────┴───────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ rayon │ 1.6.1 │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ is_executable │ 1.0.1 │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ simplelog │ 0.12.0 │",
|
|
|
|
|
"│ ├───────────────┼──────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ time │ 0.3.12 │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"├──────────────────┼───────────────┴─────────────────┬──────────────┬─────────────┬──────────┬────────────────┤",
|
|
|
|
|
"│ target │ cfg(not(target_os = \"windows\")) │ dependencies │ openssl │ version │ 0.10.38 │",
|
|
|
|
|
"│ │ │ │ ├──────────┼────────────────┤",
|
|
|
|
|
"│ │ │ │ │ features │ vendored │",
|
|
|
|
|
"│ │ │ │ ├──────────┼────────────────┤",
|
|
|
|
|
"│ │ │ │ │ optional │ true │",
|
|
|
|
|
"│ │ │ ├─────────────┼──────────┴───────┬────────┤",
|
|
|
|
|
"│ │ │ │ signal-hook │ version │ 0.3.14 │",
|
|
|
|
|
"│ │ │ │ ├──────────────────┼────────┤",
|
|
|
|
|
"│ │ │ │ │ default-features │ false │",
|
|
|
|
|
"│ ├─────────────────────────────────┼──────────────┴─────┬───────┴┬─────────────────┴────────┤",
|
|
|
|
|
"│ │ cfg(windows) │ build-dependencies │ winres │ 0.1 │",
|
|
|
|
|
"│ ├─────────────────────────────────┼──────────────┬─────┴┬───────┴──────────┬───────────────┤",
|
|
|
|
|
"│ │ cfg(target_family = \"unix\") │ dependencies │ nix │ version │ 0.25 │",
|
|
|
|
|
"│ │ │ │ ├──────────────────┼───────────────┤",
|
|
|
|
|
"│ │ │ │ │ default-features │ false │",
|
|
|
|
|
"│ │ │ │ ├──────────────────┼───────────────┤",
|
|
|
|
|
"│ │ │ │ │ features │ signal │",
|
|
|
|
|
"│ │ │ │ │ ├───────────────┤",
|
|
|
|
|
"│ │ │ │ │ │ process │",
|
|
|
|
|
"│ │ │ │ │ ├───────────────┤",
|
|
|
|
|
"│ │ │ │ │ │ fs │",
|
|
|
|
|
"│ │ │ │ │ ├───────────────┤",
|
|
|
|
|
"│ │ │ │ │ │ term │",
|
|
|
|
|
"│ │ │ ├──────┼──────────────────┴───────────────┤",
|
|
|
|
|
"│ │ │ │ atty │ 0.2 │",
|
|
|
|
|
"├──────────────────┼───────────────────┬─────────┬───┴──────────────┴──────┴──────────────────────────────────┤",
|
|
|
|
|
"│ dev-dependencies │ nu-test-support │ path │ ./crates/nu-test-support │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├─────────┼────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ version │ 0.74.1 │",
|
|
|
|
|
"│ ├───────────────────┼─────────┴────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ tempfile │ 3.2.0 │",
|
|
|
|
|
"│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ assert_cmd │ 2.0.2 │",
|
|
|
|
|
"│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ criterion │ 0.4 │",
|
|
|
|
|
"│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ pretty_assertions │ 1.0.0 │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ serial_test │ 0.10.0 │",
|
|
|
|
|
"│ ├───────────────────┼──────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ hamcrest2 │ 0.3.0 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├───────────────────┼──────────────────┬───────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ rstest │ version │ 0.15.0 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├──────────────────┼───────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ default-features │ false │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├───────────────────┼──────────────────┴───────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ itertools │ 0.10.3 │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"├──────────────────┼───────────────────┴─┬────────────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ features │ plugin │ nu-plugin │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-cli/plugin │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-parser/plugin │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-command/plugin │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-protocol/plugin │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ nu-engine/plugin │",
|
|
|
|
|
"│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ extra │ default │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ default │ plugin │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ which-support │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ trash-support │",
|
|
|
|
|
"│ │ ├────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ │ sqlite │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ stable │ default │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ wasi │ │",
|
|
|
|
|
"│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ static-link-openssl │ dep:openssl │",
|
|
|
|
|
"│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ which-support │ nu-command/which-support │",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ ├─────────────────────┼────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ trash-support │ nu-command/trash-support │",
|
|
|
|
|
"├──────────────────┼──────┬──────────────┴────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ bin │ name │ path │",
|
|
|
|
|
"│ ├──────┼───────────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ nu │ src/main.rs │",
|
|
|
|
|
"├──────────────────┼──────┴────┬──────────┬────────┬──────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ patch │ crates-io │ reedline │ git │ https://github.com/nushell/reedline.git │",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
"│ │ │ ├────────┼──────────────────────────────────────────────────────────┤",
|
Try to preserve the ordering of elements in from toml (#13045)
# Description
Enable the `preserve_order` feature of the `toml` crate to preserve the
ordering of elements when converting from/to toml.
Additionally, use `to_string_pretty()` instead of `to_string()` in `to
toml`. This displays arrays on multiple lines instead of one big single
line. I'm not sure if this one is a good idea or not... Happy to remove
this from this PR if it's not.
# User-Facing Changes
The order of elements will be different when using `from toml`. The
formatting of arrays will also be different when using `to toml`. For
example:
- before
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ bar │ 2 │
│ doo │ 3 │
│ foo │ 1 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = ["a", "b", "c", "d"]
```
- after
```
❯ "foo=1\nbar=2\ndoo=3" | from toml
╭─────┬───╮
│ foo │ 1 │
│ bar │ 2 │
│ doo │ 3 │
╰─────┴───╯
❯ {a: [a b c d]} | to toml
a = [
"a",
"b",
"c",
"d",
]
```
# Tests + Formatting
- :green_circle: `toolkit fmt`
- :green_circle: `toolkit clippy`
- :red_circle: `toolkit test`
- :black_circle: `toolkit test stdlib`
# After Submitting
<!-- If your PR had any user-facing changes, update [the
documentation](https://github.com/nushell/nushell.github.io) after the
PR is merged, if necessary. This will help us keep the docs up to date.
-->
2024-06-05 02:00:39 +02:00
|
|
|
|
"│ │ │ │ branch │ main │",
|
|
|
|
|
"├──────────────────┼───────────┴┬─────────┴────────┴──────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ bench │ name │ harness │",
|
|
|
|
|
"│ ├────────────┼─────────────────────────────────────────────────────────────────────────────┤",
|
|
|
|
|
"│ │ benchmarks │ false │",
|
|
|
|
|
"╰──────────────────┴────────────┴─────────────────────────────────────────────────────────────────────────────╯",
|
2023-04-26 20:56:10 +02:00
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
assert_eq!(actual.out, expected);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
2023-01-26 21:06:17 +01:00
|
|
|
|
fn join_lines(lines: impl IntoIterator<Item = impl AsRef<str>>) -> String {
|
|
|
|
|
lines
|
|
|
|
|
.into_iter()
|
|
|
|
|
.map(|s| s.as_ref().to_string())
|
|
|
|
|
.collect::<Vec<_>>()
|
|
|
|
|
.join("")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// util function to easier copy && paste
|
|
|
|
|
fn _print_lines(s: &str, w: usize) {
|
|
|
|
|
eprintln!("{:#?}", _split_str_by_width(s, w));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// util function to easier copy && paste
|
|
|
|
|
// todo: make UTF-8 friendly
|
|
|
|
|
fn _split_str_by_width(s: &str, w: usize) -> Vec<String> {
|
|
|
|
|
let mut lines = vec![];
|
|
|
|
|
let mut line = String::new();
|
|
|
|
|
let mut i = 0;
|
|
|
|
|
for c in s.chars() {
|
|
|
|
|
if i < w {
|
|
|
|
|
i += 1;
|
|
|
|
|
line.push(c);
|
|
|
|
|
} else {
|
|
|
|
|
lines.push(line);
|
|
|
|
|
line = String::new();
|
|
|
|
|
line.push(c);
|
|
|
|
|
i = 1;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
lines.push(line);
|
|
|
|
|
|
|
|
|
|
lines
|
|
|
|
|
}
|
2023-06-20 10:27:00 +02:00
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_index_offset() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!("1..1002 | table --width=80 --expand");
|
2023-06-20 10:27:00 +02:00
|
|
|
|
let suffix = "╭──────┬──────╮│ 1000 │ 1001 ││ 1001 │ 1002 │╰──────┴──────╯";
|
|
|
|
|
let expected_suffix = actual.out.strip_suffix(suffix);
|
|
|
|
|
assert!(expected_suffix.is_some(), "{:?}", actual.out);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_index_offset() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!("1..1002 | table --width=80");
|
2023-06-20 10:27:00 +02:00
|
|
|
|
let suffix = "╭──────┬──────╮│ 1000 │ 1001 ││ 1001 │ 1002 │╰──────┴──────╯";
|
|
|
|
|
let expected_suffix = actual.out.strip_suffix(suffix);
|
|
|
|
|
assert!(expected_suffix.is_some(), "{:?}", actual.out);
|
|
|
|
|
}
|
2023-08-04 20:50:47 +02:00
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_light() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("light"),
|
|
|
|
|
[
|
|
|
|
|
"─#───a───b─────────c──────── 0 1 2 3 1 4 5 [list 3 items] ",
|
|
|
|
|
"─#───a───b─────────c──────── 0 1 2 3 1 4 5 [list 3 items] ─#───a───b─────────c────────",
|
|
|
|
|
"─#───a───b───c─ 0 1 2 3 ─#───a───b───c─",
|
|
|
|
|
"─#───a_looooooong_name───b───c─ 0 1 2 3 ─#───a_looooooong_name───b───c─",
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_basic() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("basic"),
|
|
|
|
|
[
|
|
|
|
|
"+-#-+-a-+-b-+-------c--------+| 0 | 1 | 2 | 3 |+---+---+---+----------------+| 1 | 4 | 5 | [list 3 items] |+---+---+---+----------------+",
|
|
|
|
|
"+-#-+-a-+-b-+-------c--------+| 0 | 1 | 2 | 3 |+---+---+---+----------------+| 1 | 4 | 5 | [list 3 items] |+-#-+-a-+-b-+-------c--------+",
|
|
|
|
|
"+-#-+-a-+-b-+-c-+| 0 | 1 | 2 | 3 |+-#-+-a-+-b-+-c-+",
|
|
|
|
|
"+-#-+-a_looooooong_name-+-b-+-c-+| 0 | 1 | 2 | 3 |+-#-+-a_looooooong_name-+-b-+-c-+"
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_compact() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("compact"),
|
|
|
|
|
[
|
|
|
|
|
"─#─┬─a─┬─b─┬───────c──────── 0 │ 1 │ 2 │ 3 1 │ 4 │ 5 │ [list 3 items] ───┴───┴───┴────────────────",
|
|
|
|
|
"─#─┬─a─┬─b─┬───────c──────── 0 │ 1 │ 2 │ 3 1 │ 4 │ 5 │ [list 3 items] ─#─┴─a─┴─b─┴───────c────────",
|
|
|
|
|
"─#─┬─a─┬─b─┬─c─ 0 │ 1 │ 2 │ 3 ─#─┴─a─┴─b─┴─c─",
|
|
|
|
|
"─#─┬─a_looooooong_name─┬─b─┬─c─ 0 │ 1 │ 2 │ 3 ─#─┴─a_looooooong_name─┴─b─┴─c─"
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_compact_double() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("compact_double"),
|
|
|
|
|
[
|
|
|
|
|
"═#═╦═a═╦═b═╦═══════c════════ 0 ║ 1 ║ 2 ║ 3 1 ║ 4 ║ 5 ║ [list 3 items] ═══╩═══╩═══╩════════════════",
|
2023-09-06 20:22:12 +02:00
|
|
|
|
"═#═╦═a═╦═b═╦═══════c════════ 0 ║ 1 ║ 2 ║ 3 1 ║ 4 ║ 5 ║ [list 3 items] ═#═╩═a═╩═b═╩═══════c════════",
|
|
|
|
|
"═#═╦═a═╦═b═╦═c═ 0 ║ 1 ║ 2 ║ 3 ═#═╩═a═╩═b═╩═c═",
|
2023-08-04 20:50:47 +02:00
|
|
|
|
"═#═╦═a_looooooong_name═╦═b═╦═c═ 0 ║ 1 ║ 2 ║ 3 ═#═╩═a_looooooong_name═╩═b═╩═c═"
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_default() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("default"),
|
|
|
|
|
[
|
|
|
|
|
"╭─#─┬─a─┬─b─┬───────c────────╮│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] │╰───┴───┴───┴────────────────╯",
|
|
|
|
|
"╭─#─┬─a─┬─b─┬───────c────────╮│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] │╰─#─┴─a─┴─b─┴───────c────────╯",
|
|
|
|
|
"╭─#─┬─a─┬─b─┬─c─╮│ 0 │ 1 │ 2 │ 3 │╰─#─┴─a─┴─b─┴─c─╯",
|
|
|
|
|
"╭─#─┬─a_looooooong_name─┬─b─┬─c─╮│ 0 │ 1 │ 2 │ 3 │╰─#─┴─a_looooooong_name─┴─b─┴─c─╯"
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_heavy() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("heavy"),
|
|
|
|
|
[
|
|
|
|
|
"┏━#━┳━a━┳━b━┳━━━━━━━c━━━━━━━━┓┃ 0 ┃ 1 ┃ 2 ┃ 3 ┃┃ 1 ┃ 4 ┃ 5 ┃ [list 3 items] ┃┗━━━┻━━━┻━━━┻━━━━━━━━━━━━━━━━┛",
|
|
|
|
|
"┏━#━┳━a━┳━b━┳━━━━━━━c━━━━━━━━┓┃ 0 ┃ 1 ┃ 2 ┃ 3 ┃┃ 1 ┃ 4 ┃ 5 ┃ [list 3 items] ┃┗━#━┻━a━┻━b━┻━━━━━━━c━━━━━━━━┛",
|
|
|
|
|
"┏━#━┳━a━┳━b━┳━c━┓┃ 0 ┃ 1 ┃ 2 ┃ 3 ┃┗━#━┻━a━┻━b━┻━c━┛",
|
|
|
|
|
"┏━#━┳━a_looooooong_name━┳━b━┳━c━┓┃ 0 ┃ 1 ┃ 2 ┃ 3 ┃┗━#━┻━a_looooooong_name━┻━b━┻━c━┛"
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_reinforced() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("reinforced"),
|
|
|
|
|
[
|
|
|
|
|
"┏─#─┬─a─┬─b─┬───────c────────┓│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] │┗───┴───┴───┴────────────────┛",
|
|
|
|
|
"┏─#─┬─a─┬─b─┬───────c────────┓│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] │┗─#─┴─a─┴─b─┴───────c────────┛",
|
|
|
|
|
"┏─#─┬─a─┬─b─┬─c─┓│ 0 │ 1 │ 2 │ 3 │┗─#─┴─a─┴─b─┴─c─┛",
|
|
|
|
|
"┏─#─┬─a_looooooong_name─┬─b─┬─c─┓│ 0 │ 1 │ 2 │ 3 │┗─#─┴─a_looooooong_name─┴─b─┴─c─┛"
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_none() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("none"),
|
|
|
|
|
[
|
|
|
|
|
" # a b c 0 1 2 3 1 4 5 [list 3 items] ",
|
|
|
|
|
" # a b c 0 1 2 3 1 4 5 [list 3 items] # a b c ",
|
|
|
|
|
" # a b c 0 1 2 3 # a b c ",
|
|
|
|
|
" # a_looooooong_name b c 0 1 2 3 # a_looooooong_name b c "
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_rounded() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("rounded"),
|
|
|
|
|
[
|
|
|
|
|
"╭─#─┬─a─┬─b─┬───────c────────╮│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] │╰───┴───┴───┴────────────────╯",
|
|
|
|
|
"╭─#─┬─a─┬─b─┬───────c────────╮│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] │╰─#─┴─a─┴─b─┴───────c────────╯",
|
|
|
|
|
"╭─#─┬─a─┬─b─┬─c─╮│ 0 │ 1 │ 2 │ 3 │╰─#─┴─a─┴─b─┴─c─╯",
|
|
|
|
|
"╭─#─┬─a_looooooong_name─┬─b─┬─c─╮│ 0 │ 1 │ 2 │ 3 │╰─#─┴─a_looooooong_name─┴─b─┴─c─╯"
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_with_love() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("with_love"),
|
|
|
|
|
[
|
|
|
|
|
"❤#❤❤❤a❤❤❤b❤❤❤❤❤❤❤❤❤c❤❤❤❤❤❤❤❤ 0 ❤ 1 ❤ 2 ❤ 3 1 ❤ 4 ❤ 5 ❤ [list 3 items] ❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤❤",
|
|
|
|
|
"❤#❤❤❤a❤❤❤b❤❤❤❤❤❤❤❤❤c❤❤❤❤❤❤❤❤ 0 ❤ 1 ❤ 2 ❤ 3 1 ❤ 4 ❤ 5 ❤ [list 3 items] ❤#❤❤❤a❤❤❤b❤❤❤❤❤❤❤❤❤c❤❤❤❤❤❤❤❤",
|
|
|
|
|
"❤#❤❤❤a❤❤❤b❤❤❤c❤ 0 ❤ 1 ❤ 2 ❤ 3 ❤#❤❤❤a❤❤❤b❤❤❤c❤",
|
|
|
|
|
"❤#❤❤❤a_looooooong_name❤❤❤b❤❤❤c❤ 0 ❤ 1 ❤ 2 ❤ 3 ❤#❤❤❤a_looooooong_name❤❤❤b❤❤❤c❤"
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_on_border_thin() {
|
|
|
|
|
assert_eq!(
|
|
|
|
|
create_theme_output("thin"),
|
|
|
|
|
[
|
|
|
|
|
"┌─#─┬─a─┬─b─┬───────c────────┐│ 0 │ 1 │ 2 │ 3 │├───┼───┼───┼────────────────┤│ 1 │ 4 │ 5 │ [list 3 items] │└───┴───┴───┴────────────────┘",
|
|
|
|
|
"┌─#─┬─a─┬─b─┬───────c────────┐│ 0 │ 1 │ 2 │ 3 │├───┼───┼───┼────────────────┤│ 1 │ 4 │ 5 │ [list 3 items] │└─#─┴─a─┴─b─┴───────c────────┘",
|
|
|
|
|
"┌─#─┬─a─┬─b─┬─c─┐│ 0 │ 1 │ 2 │ 3 │└─#─┴─a─┴─b─┴─c─┘",
|
|
|
|
|
"┌─#─┬─a_looooooong_name─┬─b─┬─c─┐│ 0 │ 1 │ 2 │ 3 │└─#─┴─a_looooooong_name─┴─b─┴─c─┘",
|
|
|
|
|
]
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn create_theme_output(theme: &str) -> Vec<String> {
|
|
|
|
|
vec![
|
|
|
|
|
nu!(theme_cmd(
|
|
|
|
|
theme,
|
|
|
|
|
false,
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80"
|
2023-08-04 20:50:47 +02:00
|
|
|
|
))
|
|
|
|
|
.out,
|
|
|
|
|
nu!(theme_cmd(
|
|
|
|
|
theme,
|
|
|
|
|
true,
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80"
|
2023-08-04 20:50:47 +02:00
|
|
|
|
))
|
|
|
|
|
.out,
|
|
|
|
|
nu!(theme_cmd(
|
|
|
|
|
theme,
|
|
|
|
|
true,
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"[[a b, c]; [1 2 3]] | table --width=80"
|
|
|
|
|
))
|
|
|
|
|
.out,
|
|
|
|
|
nu!(theme_cmd(
|
|
|
|
|
theme,
|
|
|
|
|
true,
|
|
|
|
|
"[[a_looooooong_name b, c]; [1 2 3]] | table --width=80"
|
2023-08-04 20:50:47 +02:00
|
|
|
|
))
|
|
|
|
|
.out,
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn theme_cmd(theme: &str, footer: bool, then: &str) -> String {
|
2024-05-04 17:00:44 +02:00
|
|
|
|
let mut with_footer = String::new();
|
2023-08-04 20:50:47 +02:00
|
|
|
|
if footer {
|
2024-05-04 17:00:44 +02:00
|
|
|
|
with_footer = "$env.config.footer_mode = \"always\"".to_string();
|
2023-08-04 20:50:47 +02:00
|
|
|
|
}
|
|
|
|
|
|
2024-05-04 17:00:44 +02:00
|
|
|
|
format!("$env.config.table.mode = {theme}; $env.config.table.header_on_separator = true; {with_footer}; {then}")
|
2023-08-04 20:50:47 +02:00
|
|
|
|
}
|
2023-08-11 15:37:16 +02:00
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_padding_not_default() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual =
|
|
|
|
|
nu!("$env.config.table.padding = 5; [[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80");
|
2023-08-11 15:37:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───────────┬───────────┬───────────┬────────────────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├───────────┼───────────┼───────────┼────────────────────────┤\
|
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ [list 3 items] │\
|
|
|
|
|
╰───────────┴───────────┴───────────┴────────────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_padding_zero() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
"$env.config.table.padding = {left: 0, right: 0}; [[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80"
|
2023-08-11 15:37:16 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭─┬─┬─┬──────────────╮\
|
|
|
|
|
│#│a│b│ c │\
|
|
|
|
|
├─┼─┼─┼──────────────┤\
|
|
|
|
|
│0│1│2│ 3│\
|
|
|
|
|
│1│4│5│[list 3 items]│\
|
|
|
|
|
╰─┴─┴─┴──────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_padding_not_default() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!(
|
|
|
|
|
"$env.config.table.padding = 5; [[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 -e"
|
|
|
|
|
);
|
2023-08-11 15:37:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
2023-08-15 02:07:34 +02:00
|
|
|
|
"╭─────────────┬─────────────┬─────────────┬────────────────────────────────────╮\
|
|
|
|
|
│ # │ a │ b │ c │\
|
|
|
|
|
├─────────────┼─────────────┼─────────────┼────────────────────────────────────┤\
|
|
|
|
|
│ 0 │ 1 │ 2 │ 3 │\
|
|
|
|
|
│ 1 │ 4 │ 5 │ ╭───────────┬───────────╮ │\
|
|
|
|
|
│ │ │ │ │ 0 │ 1 │ │\
|
|
|
|
|
│ │ │ │ │ 1 │ 2 │ │\
|
|
|
|
|
│ │ │ │ │ 2 │ 3 │ │\
|
|
|
|
|
│ │ │ │ ╰───────────┴───────────╯ │\
|
|
|
|
|
╰─────────────┴─────────────┴─────────────┴────────────────────────────────────╯"
|
2023-08-11 15:37:16 +02:00
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_padding_zero() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!("$env.config.table.padding = {left: 0, right: 0}; [[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 -e");
|
2023-08-11 15:37:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭─┬─┬─┬─────╮\
|
|
|
|
|
│#│a│b│ c │\
|
|
|
|
|
├─┼─┼─┼─────┤\
|
|
|
|
|
│0│1│2│ 3│\
|
|
|
|
|
│1│4│5│╭─┬─╮│\
|
|
|
|
|
│ │ │ ││0│1││\
|
|
|
|
|
│ │ │ ││1│2││\
|
|
|
|
|
│ │ │ ││2│3││\
|
|
|
|
|
│ │ │ │╰─┴─╯│\
|
|
|
|
|
╰─┴─┴─┴─────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_padding_not_default() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!(
|
|
|
|
|
"$env.config.table.padding = 5; [[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 -c"
|
|
|
|
|
);
|
2023-08-11 15:37:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───────────┬───────────┬───────────╮\
|
|
|
|
|
│ a │ b │ c │\
|
|
|
|
|
├───────────┼───────────┼───────────┤\
|
|
|
|
|
│ 1 │ 2 │ 3 │\
|
|
|
|
|
├───────────┼───────────┼───────────┤\
|
|
|
|
|
│ 4 │ 5 │ 1 │\
|
|
|
|
|
│ │ ├───────────┤\
|
|
|
|
|
│ │ │ 2 │\
|
|
|
|
|
│ │ ├───────────┤\
|
|
|
|
|
│ │ │ 3 │\
|
|
|
|
|
╰───────────┴───────────┴───────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_collapse_padding_zero() {
|
2023-09-25 18:17:42 +02:00
|
|
|
|
let actual = nu!("$env.config.table.padding = {left: 0, right: 0}; [[a b, c]; [1 2 3] [4 5 [1 2 3]]] | table --width=80 -c");
|
2023-08-11 15:37:16 +02:00
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭─┬─┬─╮\
|
|
|
|
|
│a│b│c│\
|
|
|
|
|
├─┼─┼─┤\
|
|
|
|
|
│1│2│3│\
|
|
|
|
|
├─┼─┼─┤\
|
|
|
|
|
│4│5│1│\
|
|
|
|
|
│ │ ├─┤\
|
|
|
|
|
│ │ │2│\
|
|
|
|
|
│ │ ├─┤\
|
|
|
|
|
│ │ │3│\
|
|
|
|
|
╰─┴─┴─╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
2023-09-13 14:47:53 +02:00
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_leading_trailing_space_bg() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"$env.config.color_config.leading_trailing_space_bg = { bg: 'white' }; [[a b, 'c ']; [' 1 ' ' 2' '3 '] [' 4 ' "hello\nworld" [' 1 ' 2 [1 ' 2 ' 3]]]] | table --width=80"#
|
2023-09-13 14:47:53 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───────┬───────┬────────────────╮│ # │ a │ b │ c │├───┼───────┼───────┼────────────────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ hello │ [list 3 items] ││ │ │ world │ │╰───┴───────┴───────┴────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_leading_trailing_space_bg_expand() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"$env.config.color_config.leading_trailing_space_bg = { bg: 'white' }; [[a b, 'c ']; [' 1 ' ' 2' '3 '] [' 4 ' "hello\nworld" [' 1 ' 2 [1 ' 2 ' 3]]]] | table --width=80 --expand"#
|
2023-09-13 14:47:53 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬───────┬───────┬───────────────────────╮│ # │ a │ b │ c │├───┼───────┼───────┼───────────────────────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ hello │ ╭───┬───────────────╮ ││ │ │ world │ │ 0 │ 1 │ ││ │ │ │ │ 1 │ 2 │ ││ │ │ │ │ 2 │ ╭───┬───────╮ │ ││ │ │ │ │ │ │ 0 │ 1 │ │ ││ │ │ │ │ │ │ 1 │ 2 │ │ ││ │ │ │ │ │ │ 2 │ 3 │ │ ││ │ │ │ │ │ ╰───┴───────╯ │ ││ │ │ │ ╰───┴───────────────╯ │╰───┴───────┴───────┴───────────────────────╯"
|
|
|
|
|
);
|
|
|
|
|
}
|
2023-09-20 19:59:08 +02:00
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_abbreviation() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"[[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80 -a 100"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬───┬───┬────────────────╮│ # │ a │ b │ c │├───┼───┼───┼────────────────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] ││ 2 │ 1 │ 2 │ 3 ││ 3 │ 1 │ 2 │ 3 ││ 4 │ 1 │ 2 │ 3 ││ 5 │ 1 │ 2 │ 3 ││ 6 │ 1 │ 2 │ 3 │╰───┴───┴───┴────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"[[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80 -a 2"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬─────┬─────┬────────────────╮│ # │ a │ b │ c │├───┼─────┼─────┼────────────────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] ││ 2 │ ... │ ... │ ... ││ 3 │ 1 │ 2 │ 3 ││ 4 │ 1 │ 2 │ 3 │╰───┴─────┴─────┴────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"[[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80 -a 1"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬─────┬─────┬─────╮│ # │ a │ b │ c │├───┼─────┼─────┼─────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ ... │ ... │ ... ││ 2 │ 1 │ 2 │ 3 │╰───┴─────┴─────┴─────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"[[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80 -a 0"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
2024-02-24 02:12:10 +01:00
|
|
|
|
assert_eq!(actual.out, "");
|
2023-09-20 19:59:08 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_abbreviation_kv() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"{ a: 1 b: { a: 1 b: [1 2 3] c: [1 2 3] } c: [1 2 [1 2 3] 3] e: 1 q: 2 t: 4 r: 1 x: 9 } | table --width=80 -a 100"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬───────────────────╮│ a │ 1 ││ b │ {record 3 fields} ││ c │ [list 4 items] ││ e │ 1 ││ q │ 2 ││ t │ 4 ││ r │ 1 ││ x │ 9 │╰───┴───────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"{ a: 1 b: { a: 1 b: [1 2 3] c: [1 2 3] } c: [1 2 [1 2 3] 3] e: 1 q: 2 t: 4 r: 1 x: 9 } | table --width=80 -a 2"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭─────┬───────────────────╮│ a │ 1 ││ b │ {record 3 fields} ││ ... │ ... ││ r │ 1 ││ x │ 9 │╰─────┴───────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"{ a: 1 b: { a: 1 b: [1 2 3] c: [1 2 3] } c: [1 2 [1 2 3] 3] e: 1 q: 2 t: 4 r: 1 x: 9 } | table --width=80 -a 1"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭─────┬─────╮│ a │ 1 ││ ... │ ... ││ x │ 9 │╰─────┴─────╯"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"{ a: 1 b: { a: 1 b: [1 2 3] c: [1 2 3] } c: [1 2 [1 2 3] 3] e: 1 q: 2 t: 4 r: 1 x: 9 } | table --width=80 -a 0"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭─────┬─────╮│ ... │ ... │╰─────┴─────╯");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_abbreviation_kv_expand() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"{ a: 1 b: { a: 1 b: [1 2 3] c: [1 2 3] } c: [1 2 [1 2 3] 3] e: 1 q: 2 t: 4 r: 1 x: 9 } | table --width=80 -a 100 -e"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬───────────────────╮│ a │ 1 ││ │ ╭───┬───────────╮ ││ b │ │ a │ 1 │ ││ │ │ │ ╭───┬───╮ │ ││ │ │ b │ │ 0 │ 1 │ │ ││ │ │ │ │ 1 │ 2 │ │ ││ │ │ │ │ 2 │ 3 │ │ ││ │ │ │ ╰───┴───╯ │ ││ │ │ │ ╭───┬───╮ │ ││ │ │ c │ │ 0 │ 1 │ │ ││ │ │ │ │ 1 │ 2 │ │ ││ │ │ │ │ 2 │ 3 │ │ ││ │ │ │ ╰───┴───╯ │ ││ │ ╰───┴───────────╯ ││ │ ╭───┬───────────╮ ││ c │ │ 0 │ 1 │ ││ │ │ 1 │ 2 │ ││ │ │ 2 │ ╭───┬───╮ │ ││ │ │ │ │ 0 │ 1 │ │ ││ │ │ │ │ 1 │ 2 │ │ ││ │ │ │ │ 2 │ 3 │ │ ││ │ │ │ ╰───┴───╯ │ ││ │ │ 3 │ 3 │ ││ │ ╰───┴───────────╯ ││ e │ 1 ││ q │ 2 ││ t │ 4 ││ r │ 1 ││ x │ 9 │╰───┴───────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"{ a: 1 b: { a: 1 b: [1 2 3] c: [1 2 3] } c: [1 2 [1 2 3] 3] e: 1 q: 2 t: 4 r: 1 x: 9 } | table --width=80 -a 2 -e"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭─────┬───────────────────╮│ a │ 1 ││ │ ╭───┬───────────╮ ││ b │ │ a │ 1 │ ││ │ │ │ ╭───┬───╮ │ ││ │ │ b │ │ 0 │ 1 │ │ ││ │ │ │ │ 1 │ 2 │ │ ││ │ │ │ │ 2 │ 3 │ │ ││ │ │ │ ╰───┴───╯ │ ││ │ │ │ ╭───┬───╮ │ ││ │ │ c │ │ 0 │ 1 │ │ ││ │ │ │ │ 1 │ 2 │ │ ││ │ │ │ │ 2 │ 3 │ │ ││ │ │ │ ╰───┴───╯ │ ││ │ ╰───┴───────────╯ ││ ... │ ... ││ r │ 1 ││ x │ 9 │╰─────┴───────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"{ a: 1 b: { a: 1 b: [1 2 3] c: [1 2 3] } c: [1 2 [1 2 3] 3] e: 1 q: 2 t: 4 r: 1 x: 9 } | table --width=80 -a 1 -e"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭─────┬─────╮│ a │ 1 ││ ... │ ... ││ x │ 9 │╰─────┴─────╯"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"{ a: 1 b: { a: 1 b: [1 2 3] c: [1 2 3] } c: [1 2 [1 2 3] 3] e: 1 q: 2 t: 4 r: 1 x: 9 } | table --width=80 -a 0 -e"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭─────┬─────╮│ ... │ ... │╰─────┴─────╯");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_abbreviation_by_config() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"$env.config.table.abbreviated_row_count = 100; [[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬───┬───┬────────────────╮│ # │ a │ b │ c │├───┼───┼───┼────────────────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] ││ 2 │ 1 │ 2 │ 3 ││ 3 │ 1 │ 2 │ 3 ││ 4 │ 1 │ 2 │ 3 ││ 5 │ 1 │ 2 │ 3 ││ 6 │ 1 │ 2 │ 3 │╰───┴───┴───┴────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"$env.config.table.abbreviated_row_count = 2; [[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬─────┬─────┬────────────────╮│ # │ a │ b │ c │├───┼─────┼─────┼────────────────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] ││ 2 │ ... │ ... │ ... ││ 3 │ 1 │ 2 │ 3 ││ 4 │ 1 │ 2 │ 3 │╰───┴─────┴─────┴────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"$env.config.table.abbreviated_row_count = 1; [[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬─────┬─────┬─────╮│ # │ a │ b │ c │├───┼─────┼─────┼─────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ ... │ ... │ ... ││ 2 │ 1 │ 2 │ 3 │╰───┴─────┴─────┴─────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"$env.config.table.abbreviated_row_count = 0; [[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
2024-02-24 02:12:10 +01:00
|
|
|
|
assert_eq!(actual.out, "");
|
2023-09-20 19:59:08 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_abbreviation_by_config_override() {
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"$env.config.table.abbreviated_row_count = 2; [[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80 -a 1"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬─────┬─────┬─────╮│ # │ a │ b │ c │├───┼─────┼─────┼─────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ ... │ ... │ ... ││ 2 │ 1 │ 2 │ 3 │╰───┴─────┴─────┴─────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(
|
2023-09-25 18:17:42 +02:00
|
|
|
|
r#"$env.config.table.abbreviated_row_count = 1; [[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3] [1 2 3] [1 2 3] [1 2 3] [1 2 3]] | table --width=80 -a 2"#
|
2023-09-20 19:59:08 +02:00
|
|
|
|
);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬─────┬─────┬────────────────╮│ # │ a │ b │ c │├───┼─────┼─────┼────────────────┤│ 0 │ 1 │ 2 │ 3 ││ 1 │ 4 │ 5 │ [list 3 items] ││ 2 │ ... │ ... │ ... ││ 3 │ 1 │ 2 │ 3 ││ 4 │ 1 │ 2 │ 3 │╰───┴─────┴─────┴────────────────╯");
|
|
|
|
|
}
|
2023-11-16 00:41:18 +01:00
|
|
|
|
|
2024-02-24 02:12:10 +01:00
|
|
|
|
#[test]
|
|
|
|
|
fn table_abbreviation_cut() {
|
|
|
|
|
let actual = nu!(r#"0..2000 | table --width=80 -a 0"#);
|
|
|
|
|
assert_eq!(actual.out, "");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(r#"0..2000 | table --width=80 -a 1"#);
|
|
|
|
|
assert_eq!(
|
|
|
|
|
actual.out,
|
|
|
|
|
"╭───┬──────╮│ 0 │ 0 ││ 1 │ ... ││ 2 │ 2000 │╰───┴──────╯"
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(r#"0..2000 | table --width=80 -a 3"#);
|
|
|
|
|
assert_eq!(actual.out, "╭───┬──────╮│ 0 │ 0 ││ 1 │ 1 ││ 2 │ 2 ││ 3 │ ... ││ 4 │ 1998 ││ 5 │ 1999 ││ 6 │ 2000 │╰───┴──────╯");
|
|
|
|
|
|
|
|
|
|
let output = "╭──────┬──────╮│ 0 │ 0 ││ 1 │ 1 ││ 2 │ 2 ││ 3 │ 3 ││ 4 │ 4 ││ 5 │ 5 ││ 6 │ 6 ││ 7 │ 7 ││ 8 │ 8 ││ 9 │ 9 ││ 10 │ 10 ││ 11 │ 11 ││ 12 │ 12 ││ 13 │ 13 ││ 14 │ 14 ││ 15 │ 15 ││ 16 │ 16 ││ 17 │ 17 ││ 18 │ 18 ││ 19 │ 19 ││ 20 │ 20 ││ 21 │ 21 ││ 22 │ 22 ││ 23 │ 23 ││ 24 │ 24 ││ 25 │ 25 ││ 26 │ 26 ││ 27 │ 27 ││ 28 │ 28 ││ 29 │ 29 ││ 30 │ 30 ││ 31 │ 31 ││ 32 │ 32 ││ 33 │ 33 ││ 34 │ 34 ││ 35 │ 35 ││ 36 │ 36 ││ 37 │ 37 ││ 38 │ 38 ││ 39 │ 39 ││ 40 │ 40 ││ 41 │ 41 ││ 42 │ 42 ││ 43 │ 43 ││ 44 │ 44 ││ 45 │ 45 ││ 46 │ 46 ││ 47 │ 47 ││ 48 │ 48 ││ 49 │ 49 ││ 50 │ 50 ││ 51 │ 51 ││ 52 │ 52 ││ 53 │ 53 ││ 54 │ 54 ││ 55 │ 55 ││ 56 │ 56 ││ 57 │ 57 ││ 58 │ 58 ││ 59 │ 59 ││ 60 │ 60 ││ 61 │ 61 ││ 62 │ 62 ││ 63 │ 63 ││ 64 │ 64 ││ 65 │ 65 ││ 66 │ 66 ││ 67 │ 67 ││ 68 │ 68 ││ 69 │ 69 ││ 70 │ 70 ││ 71 │ 71 ││ 72 │ 72 ││ 73 │ 73 ││ 74 │ 74 ││ 75 │ 75 ││ 76 │ 76 ││ 77 │ 77 ││ 78 │ 78 ││ 79 │ 79 ││ 80 │ 80 ││ 81 │ 81 ││ 82 │ 82 ││ 83 │ 83 ││ 84 │ 84 ││ 85 │ 85 ││ 86 │ 86 ││ 87 │ 87 ││ 88 │ 88 ││ 89 │ 89 ││ 90 │ 90 ││ 91 │ 91 ││ 92 │ 92 ││ 93 │ 93 ││ 94 │ 94 ││ 95 │ 95 ││ 96 │ 96 ││ 97 │ 97 ││ 98 │ 98 ││ 99 │ 99 ││ 100 │ 100 ││ 101 │ 101 ││ 102 │ 102 ││ 103 │ 103 ││ 104 │ 104 ││ 105 │ 105 ││ 106 │ 106 ││ 107 │ 107 ││ 108 │ 108 ││ 109 │ 109 ││ 110 │ 110 ││ 111 │ 111 ││ 112 │ 112 ││ 113 │ 113 ││ 114 │ 114 ││ 115 │ 115 ││ 116 │ 116 ││ 117 │ 117 ││ 118 │ 118 ││ 119 │ 119 ││ 120 │ 120 ││ 121 │ 121 ││ 122 │ 122 ││ 123 │ 123 ││ 124 │ 124 ││ 125 │ 125 ││ 126 │ 126 ││ 127 │ 127 ││ 128 │ 128 ││ 129 │ 129 ││ 130 │ 130 ││ 131 │ 131 ││ 132 │ 132 ││ 133 │ 133 ││ 134 │ 134 ││ 135 │ 135 ││ 136 │ 136 ││ 137 │ 137 ││ 138 │ 138 ││ 139 │ 139 ││ 140 │ 140 ││ 141 │ 141 ││ 142 │ 142 ││ 143 │ 143 ││ 144 │ 144 ││ 145 │ 145 ││ 146 │ 146 ││ 147 │ 147 ││ 148 │ 148 ││ 149 │ 149 ││ 150 │ 150 ││ 151 │ 151 ││ 152 │ 152 ││ 153 │ 153 ││ 154 │ 154 ││ 155 │ 155 ││ 156 │ 156 ││ 157 │ 157 ││ 158 │ 158 ││ 159 │ 159 ││ 160 │ 160 ││ 161 │ 161 ││ 162 │ 162 ││ 163 │ 163 ││ 164 │ 164 ││ 165 │ 165 ││ 166 │ 166 ││ 167 │ 167 ││ 168 │ 168 ││ 169 │ 169 ││ 170 │ 170 ││ 171 │ 171 ││ 172 │ 172 ││ 173 │ 173 ││ 174 │ 174 ││ 175 │ 175 ││ 176 │ 176 ││ 177 │ 177 ││ 178 │ 178 ││ 179 │ 179 ││ 180 │ 180 ││ 181 │ 181 ││ 182 │ 182 ││ 183 │ 183 ││ 184 │ 184 ││ 185 │ 185 ││ 186 │ 186 ││ 187 │ 187 ││ 188 │ 188 ││ 189 │ 189 ││ 190 │ 190 ││ 191 │ 191 │
|
|
|
|
|
|
|
|
|
|
let actual = nu!(r#"0..2000 | table --width=80 -a 2000"#);
|
|
|
|
|
assert_eq!(actual.out, output);
|
|
|
|
|
|
|
|
|
|
let actual = nu!(r#"0..2000 | table --width=80 -a 200000"#);
|
|
|
|
|
assert_eq!(actual.out, output);
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-16 12:28:54 +01:00
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_inner_index_0() {
|
|
|
|
|
let actual = nu!("0..1000 | each {[0]} | table -e");
|
|
|
|
|
assert_eq!(actual.out, "╭─────┬───────────╮│ 0 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 1 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 2 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 3 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 4 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 5 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 6 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 7 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 8 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 9 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 10 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 11 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 12 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 13 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 14 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 15 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 16 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 17 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 18 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 19 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 20 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 21 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 22 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 23 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 24 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 25 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 26 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 27 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 28 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 29 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 30 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 31 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 32 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 33 │ ╭───┬───╮ ││ │ │ 0 │ 0 │ ││ │ ╰───┴───╯ ││ 34 │ ╭───┬─<E294AC><E29480>
|
|
|
|
|
}
|
|
|
|
|
|
2023-11-16 00:41:18 +01:00
|
|
|
|
#[test]
|
|
|
|
|
fn table_theme_arg() {
|
|
|
|
|
let actual = nu!("[[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3]] | table --width=80 --theme light");
|
|
|
|
|
assert_eq!(actual.out, " # a b c ──────────────────────────── 0 1 2 3 1 4 5 [list 3 items] 2 1 2 3 ");
|
|
|
|
|
|
|
|
|
|
let actual = nu!(theme_cmd(
|
|
|
|
|
"basic",
|
|
|
|
|
false,
|
|
|
|
|
"[[a b, c]; [1 2 3] [4 5 [1 2 3]] [1 2 3]] | table --width=80 --theme light"
|
|
|
|
|
));
|
|
|
|
|
assert_eq!(actual.out, "─#───a───b─────────c──────── 0 1 2 3 1 4 5 [list 3 items] 2 1 2 3 ");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_index_arg() {
|
|
|
|
|
let actual = nu!("[[a b]; [1 2] [2 [4 4]]] | table --width=80 --theme basic -i false");
|
|
|
|
|
assert_eq!(actual.out, "+---+----------------+| a | b |+---+----------------+| 1 | 2 |+---+----------------+| 2 | [list 2 items] |+---+----------------+");
|
|
|
|
|
|
|
|
|
|
let actual = nu!("[[a b]; [1 2] [2 [4 4]]] | table --width=80 --theme basic -i true");
|
|
|
|
|
assert_eq!(actual.out, "+---+---+----------------+| # | a | b |+---+---+----------------+| 0 | 1 | 2 |+---+---+----------------+| 1 | 2 | [list 2 items] |+---+---+----------------+");
|
|
|
|
|
|
|
|
|
|
let actual = nu!("[[a b]; [1 2] [2 [4 4]]] | table --width=80 --theme basic -i 10");
|
|
|
|
|
assert_eq!(actual.out, "+----+---+----------------+| # | a | b |+----+---+----------------+| 10 | 1 | 2 |+----+---+----------------+| 11 | 2 | [list 2 items] |+----+---+----------------+");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_expand_index_arg() {
|
|
|
|
|
let actual = nu!("[[a b]; [1 2] [2 [4 4]]] | table --width=80 --theme basic --expand -i false");
|
|
|
|
|
assert_eq!(actual.out, "+---+-------+| a | b |+---+-------+| 1 | 2 |+---+-------+| 2 | +---+ || | | 4 | || | +---+ || | | 4 | || | +---+ |+---+-------+");
|
|
|
|
|
|
|
|
|
|
let actual = nu!("[[a b]; [1 2] [2 [4 4]]] | table --width=80 --theme basic --expand -i true");
|
|
|
|
|
assert_eq!(actual.out, "+---+---+-----------+| # | a | b |+---+---+-----------+| 0 | 1 | 2 |+---+---+-----------+| 1 | 2 | +---+---+ || | | | 0 | 4 | || | | +---+---+ || | | | 1 | 4 | || | | +---+---+ |+---+---+-----------+");
|
|
|
|
|
|
|
|
|
|
let actual = nu!("[[a b]; [1 2] [2 [4 4]]] | table --width=80 --theme basic --expand -i 10");
|
2023-11-16 12:28:54 +01:00
|
|
|
|
assert_eq!(actual.out, "+----+---+-----------+| # | a | b |+----+---+-----------+| 10 | 1 | 2 |+----+---+-----------+| 11 | 2 | +---+---+ || | | | 0 | 4 | || | | +---+---+ || | | | 1 | 4 | || | | +---+---+ |+----+---+-----------+");
|
2023-11-16 00:41:18 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
|
|
fn table_list() {
|
|
|
|
|
let actual = nu!("table --list");
|
|
|
|
|
assert_eq!(actual.out, "╭────┬────────────────╮│ 0 │ basic ││ 1 │ compact ││ 2 │ compact_double ││ 3 │ default ││ 4 │ heavy ││ 5 │ light ││ 6 │ none ││ 7 │ reinforced ││ 8 │ rounded ││ 9 │ thin ││ 10 │ with_love ││ 11 │ psql ││ 12 │ markdown ││ 13 │ dots ││ 14 │ restructured ││ 15 │ ascii_rounded ││ 16 │ basic_compact │╰────┴────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!("ls | table --list");
|
|
|
|
|
assert_eq!(actual.out, "╭────┬────────────────╮│ 0 │ basic ││ 1 │ compact ││ 2 │ compact_double ││ 3 │ default ││ 4 │ heavy ││ 5 │ light ││ 6 │ none ││ 7 │ reinforced ││ 8 │ rounded ││ 9 │ thin ││ 10 │ with_love ││ 11 │ psql ││ 12 │ markdown ││ 13 │ dots ││ 14 │ restructured ││ 15 │ ascii_rounded ││ 16 │ basic_compact │╰────┴────────────────╯");
|
|
|
|
|
|
|
|
|
|
let actual = nu!("table --list --theme basic");
|
|
|
|
|
assert_eq!(actual.out, "╭────┬────────────────╮│ 0 │ basic ││ 1 │ compact ││ 2 │ compact_double ││ 3 │ default ││ 4 │ heavy ││ 5 │ light ││ 6 │ none ││ 7 │ reinforced ││ 8 │ rounded ││ 9 │ thin ││ 10 │ with_love ││ 11 │ psql ││ 12 │ markdown ││ 13 │ dots ││ 14 │ restructured ││ 15 │ ascii_rounded ││ 16 │ basic_compact │╰────┴────────────────╯");
|
|
|
|
|
}
|