From 42a1adf2e9664ba05eb44afd44ebbf948656ca99 Mon Sep 17 00:00:00 2001 From: George Pollard Date: Wed, 15 Jul 2020 15:48:20 +1200 Subject: [PATCH] Indices are (now) green, bold, right-aligned (#2181) With https://github.com/nushell/nushell/pull/355 the (numeric) index column of tables was changed to be right-aligned. After the move to `nu-table` the index column is now centered instead of right-aligned. I think this is a copy-paste bug where [this line](https://github.com/nushell/nushell/blob/71e55541d7ede7cfc318bb5d15bd5c2e187db6a6/crates/nu-cli/src/commands/table.rs#L190) has been copied from [this line](https://github.com/nushell/nushell/blob/71e55541d7ede7cfc318bb5d15bd5c2e187db6a6/crates/nu-cli/src/commands/table.rs#L207), since the code is out-of-sync with the comment. This change restores harmony between the description and the function of the code. --- crates/nu-cli/src/commands/table.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/nu-cli/src/commands/table.rs b/crates/nu-cli/src/commands/table.rs index 465ec7eeb1..bf30de8f93 100644 --- a/crates/nu-cli/src/commands/table.rs +++ b/crates/nu-cli/src/commands/table.rs @@ -187,7 +187,7 @@ fn values_to_entries( StyledString::new( (starting_idx + idx).to_string(), TextStyle { - alignment: Alignment::Center, + alignment: Alignment::Right, color: Some(ansi_term::Color::Green), is_bold: true, },