From 4c9078ccccda3294f4789ec5a71eead0c83acf24 Mon Sep 17 00:00:00 2001 From: Darren Schroeder <343840+fdncred@users.noreply.github.com> Date: Thu, 5 Dec 2024 21:36:35 -0600 Subject: [PATCH] add file column to `scope modules` output (#14524) # Description This PR adds a `file` column to the `scope modules` output table. ![image](https://github.com/user-attachments/assets/d69f3dec-3f9a-4ff9-b971-1fd533520ec7) # User-Facing Changes # Tests + Formatting # After Submitting --- crates/nu-engine/src/scope.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/nu-engine/src/scope.rs b/crates/nu-engine/src/scope.rs index 62acd6a9a7..45f6f983fc 100644 --- a/crates/nu-engine/src/scope.rs +++ b/crates/nu-engine/src/scope.rs @@ -488,6 +488,7 @@ impl<'e, 's> ScopeData<'e, 's> { "description" => Value::string(module_desc, span), "extra_description" => Value::string(module_extra_desc, span), "module_id" => Value::int(module_id.get() as i64, span), + "file" => Value::string(module.file.clone().map_or("unknown".to_string(), |(p, _)| p.path().to_string_lossy().to_string()), span), }, span, )