From 3d20c53904ad2eb62d19c2980f4593c1ed6346f7 Mon Sep 17 00:00:00 2001 From: Wind Date: Fri, 6 Sep 2024 19:39:52 +0800 Subject: [PATCH] make a user friendly message when `use_grid_icons` is used in config (#13795) # Description After merging #13788, I get an error message which says that `use_grid_icons` is invalid. I think it's good to report the specific error, and guide user to delete it. --- crates/nu-protocol/src/config/mod.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/nu-protocol/src/config/mod.rs b/crates/nu-protocol/src/config/mod.rs index 2c2dd08277..b6f98ed883 100644 --- a/crates/nu-protocol/src/config/mod.rs +++ b/crates/nu-protocol/src/config/mod.rs @@ -524,6 +524,14 @@ impl Value { *value = config.color_config.clone().into_value(span); } } + "use_grid_icons" => { + // TODO: delete it after 0.99 + report_invalid_value( + "`use_grid_icons` is deleted, you should delete the key, and use `grid -i` in such case.", + span, + &mut errors + ); + } "footer_mode" => { process_string_enum( &mut config.footer_mode,