mirror of
https://github.com/nushell/nushell
synced 2024-12-27 21:43:09 +00:00
ee74ec7423
# Description fixed #11678 The sub-commands of from command (`from {csv, tsv, ssv}`) name columns starting from index 0. This behaviour is inconsistent with other commands such as `detect columns`. This PR makes the subcommands index 0-based. # User-Facing Changes The subcommands (`from {csv, tsv, ssv}`) return a table with the columns starting at index 0 if no header data is passed. ``` ~/Development/nushell> "foo bar baz" | from ssv -n -m 1 ╭───┬─────────┬─────────┬─────────╮ │ # │ column0 │ column1 │ column2 │ ├───┼─────────┼─────────┼─────────┤ │ 0 │ foo │ bar │ baz │ ╰───┴─────────┴─────────┴─────────╯ ~/Development/nushell> "foo,bar,baz" | from csv -n ╭───┬─────────┬─────────┬─────────╮ │ # │ column0 │ column1 │ column2 │ ├───┼─────────┼─────────┼─────────┤ │ 0 │ foo │ bar │ baz │ ╰───┴─────────┴─────────┴─────────╯ ~/Development/nushell> "foo\tbar\tbaz" | from tsv -n ╭───┬─────────┬─────────┬─────────╮ │ # │ column0 │ column1 │ column2 │ ├───┼─────────┼─────────┼─────────┤ │ 0 │ foo │ bar │ baz │ ╰───┴─────────┴─────────┴─────────╯ ``` # Tests + Formatting When I ran tests, `commands::touch::change_file_mtime_to_reference` failed with the following error. The error also occurs in the master branch, so it's probably unrelated to these changes. (maybe a problem with my dev environment) ``` $ toolkit check pr ~~~~~~~~ failures: ---- commands::touch::change_file_mtime_to_reference stdout ---- === stderr thread 'commands::touch::change_file_mtime_to_reference' panicked at crates/nu-command/tests/commands/touch.rs:298:9: assertion `left == right` failed left: SystemTime { tv_sec: 1719149697, tv_nsec: 57576929 } right: SystemTime { tv_sec: 1719149697, tv_nsec: 78219489 } failures: commands::touch::change_file_mtime_to_reference test result: FAILED. 1533 passed; 1 failed; 32 ignored; 0 measured; 0 filtered out; finished in 10.87s error: test failed, to rerun pass `-p nu-command --test main` - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🔴 `toolkit test` - ⚫ `toolkit test stdlib` ``` # After Submitting nothing |
||
---|---|---|
.. | ||
nu-cli | ||
nu-cmd-base | ||
nu-cmd-extra | ||
nu-cmd-lang | ||
nu-cmd-plugin | ||
nu-color-config | ||
nu-command | ||
nu-derive-value | ||
nu-engine | ||
nu-explore | ||
nu-glob | ||
nu-json | ||
nu-lsp | ||
nu-parser | ||
nu-path | ||
nu-plugin | ||
nu-plugin-core | ||
nu-plugin-engine | ||
nu-plugin-protocol | ||
nu-plugin-test-support | ||
nu-pretty-hex | ||
nu-protocol | ||
nu-std | ||
nu-system | ||
nu-table | ||
nu-term-grid | ||
nu-test-support | ||
nu-utils | ||
nu_plugin_custom_values | ||
nu_plugin_example | ||
nu_plugin_formats | ||
nu_plugin_gstat | ||
nu_plugin_inc | ||
nu_plugin_nu_example | ||
nu_plugin_polars | ||
nu_plugin_python | ||
nu_plugin_query | ||
nu_plugin_stress_internals | ||
nuon | ||
README.md |
Nushell core libraries and plugins
These sub-crates form both the foundation for Nu and a set of plugins which extend Nu with additional functionality.
Foundational libraries are split into two kinds of crates:
- Core crates - those crates that work together to build the Nushell language engine
- Support crates - a set of crates that support the engine with additional features like JSON support, ANSI support, and more.
Plugins are likewise also split into two types:
- Core plugins - plugins that provide part of the default experience of Nu, including access to the system properties, processes, and web-connectivity features.
- Extra plugins - these plugins run a wide range of different capabilities like working with different file types, charting, viewing binary data, and more.