nushell/crates/nu-cli/tests/commands/mod.rs
Sam Hedin ae5f3c8210
WIP: 1486/first row as headers (#1530)
* headers plugin

* Remove plugin

* Add non-functioning headers command

* Add ability to extract headers from first row

* Refactor header extraction

* Rebuild indexmap with proper headers

* Rebuild result properly

* Compiling, probably wrapped too much?

* Refactoring

* Deal with case of empty header cell

* Deal with case of empty header cell

* Fix formatting

* Fix linting, attempt 2.

* Move whole_stream_command(Headers) to more appropriate section

* ... more linting

* Return Err(ShellError...) instead of panic, yield each row instead of entire table

* Insert Column[index] if no header info is found.

* Update error description

* Add initial test

* Add tests for headers command

* Lint test cases in headers

* Change ShellError for headers, Add sample_headers file to utils.rs

* Add empty sheet to test file

* Revert "Add empty sheet to test file"

This reverts commit a4bf38a31d.

* Show error message when given empty table
2020-03-29 15:05:57 +13:00

38 lines
414 B
Rust

mod append;
mod calc;
mod cd;
mod compact;
mod cp;
mod default;
mod edit;
mod enter;
mod first;
mod format;
mod get;
mod group_by;
mod headers;
mod histogram;
mod insert;
mod last;
mod lines;
mod ls;
mod mkdir;
mod mv;
mod open;
mod parse;
mod pick;
mod prepend;
mod range;
mod rename;
mod reverse;
mod rm;
mod save;
mod sort_by;
mod split_by;
mod split_column;
mod sum;
mod touch;
mod uniq;
mod where_;
mod wrap;