mirror of
https://github.com/nushell/nushell.git
synced 2024-11-28 19:33:47 +01:00
updated main
in table so that it outputs again (#3662)
This commit is contained in:
parent
318d13ed58
commit
7c0a52a81e
22
crates/nu-table/.gitignore
vendored
Normal file
22
crates/nu-table/.gitignore
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
/target
|
||||||
|
/scratch
|
||||||
|
**/*.rs.bk
|
||||||
|
history.txt
|
||||||
|
tests/fixtures/nuplayground
|
||||||
|
crates/*/target
|
||||||
|
|
||||||
|
# Debian/Ubuntu
|
||||||
|
debian/.debhelper/
|
||||||
|
debian/debhelper-build-stamp
|
||||||
|
debian/files
|
||||||
|
debian/nu.substvars
|
||||||
|
debian/nu/
|
||||||
|
|
||||||
|
# macOS junk
|
||||||
|
.DS_Store
|
||||||
|
|
||||||
|
# JetBrains' IDE items
|
||||||
|
.idea/*
|
||||||
|
|
||||||
|
# VSCode's IDE items
|
||||||
|
.vscode/*
|
@ -23,11 +23,12 @@ fn main() {
|
|||||||
let rows = vec_of_str_to_vec_of_styledstr(&row_data, false);
|
let rows = vec_of_str_to_vec_of_styledstr(&row_data, false);
|
||||||
// The table itself
|
// The table itself
|
||||||
let table = Table::new(headers, vec![rows; 3], Theme::rounded());
|
let table = Table::new(headers, vec![rows; 3], Theme::rounded());
|
||||||
|
|
||||||
// FIXME: Config isn't available from here so just put these here to compile
|
// FIXME: Config isn't available from here so just put these here to compile
|
||||||
let color_hm: HashMap<String, nu_ansi_term::Style> = HashMap::new();
|
let color_hm: HashMap<String, nu_ansi_term::Style> = HashMap::new();
|
||||||
|
// Capture the table as a string
|
||||||
|
let output_table = draw_table(&table, width, &color_hm);
|
||||||
// Draw the table
|
// Draw the table
|
||||||
draw_table(&table, width, &color_hm);
|
println!("{}", output_table)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn make_table_data() -> (Vec<&'static str>, Vec<&'static str>) {
|
fn make_table_data() -> (Vec<&'static str>, Vec<&'static str>) {
|
||||||
|
Loading…
Reference in New Issue
Block a user