From 7c274ad4d8a9dad40f6b6f2aa2d75c157f687208 Mon Sep 17 00:00:00 2001 From: Reilly Wood <26268125+rgwood@users.noreply.github.com> Date: Sat, 30 Sep 2023 19:26:43 -0500 Subject: [PATCH] `explore`: remove 4 line config options (#10562) This PR removes the `line_head_top`, `line_head_bottom`, `line_shift`, and `line_index` configuration options from `explore`. These were previously used to control whether the horizontal+vertical lines in this `ls | explore -i` screenshot would be displayed: ![image](https://github.com/nushell/nushell/assets/26268125/b705e8a0-935c-40ff-be4a-f119dbae3080) Now, all lines are displayed (same as the previous default config values) and this is no longer configurable. ## Context I'm continuing to chip away at `explore` when I have time. I have a long-term goal to make `explore` simpler for users+developers. For now I'm mostly making small incremental changes where I find underused functionality+configuration and remove it; hopefully eventually this will make it easier to make larger changes. I found these specific config options a little hard to understand when reading `explore` code, and when reading `config.nu` as a user their behaviour+naming is not obvious. I also think that in the long term, `explore` styling should inherit most styling from `table` instead of having its own styling system. --- crates/nu-explore/src/commands/table.rs | 25 ---- crates/nu-explore/src/explore.rs | 12 -- crates/nu-explore/src/views/record/mod.rs | 21 --- crates/nu-explore/src/views/record/tablew.rs | 122 ++++++++---------- .../src/sample_config/default_config.nu | 4 - 5 files changed, 53 insertions(+), 131 deletions(-) diff --git a/crates/nu-explore/src/commands/table.rs b/crates/nu-explore/src/commands/table.rs index 21a2237499..6ef36697ef 100644 --- a/crates/nu-explore/src/commands/table.rs +++ b/crates/nu-explore/src/commands/table.rs @@ -25,10 +25,6 @@ pub struct TableCmd { #[derive(Debug, Default, Clone)] struct TableSettings { orientation: Option, - line_head_top: Option, - line_head_bottom: Option, - line_shift: Option, - line_index: Option, split_line_s: Option