From 89ad54a2e5e6060cf1de91dba3e79d76d048bdaf Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Sun, 22 Aug 2021 08:31:01 +0300 Subject: [PATCH] Add variable type to output --- helix-term/src/commands.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs index 71b1f5e5..1c0084fc 100644 --- a/helix-term/src/commands.rs +++ b/helix-term/src/commands.rs @@ -1937,7 +1937,11 @@ fn variables( Ok(vars) => { let mut s = String::new(); for var in vars { - s.push_str(&format!("{} = {}; ", var.name, var.value)); + let prefix = match var.data_type { + Some(data_type) => format!("{} ", data_type), + None => "".to_owned(), + }; + s.push_str(&format!("{}{} = {}; ", prefix, var.name, var.value)); } s }