aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-22 05:31:01 +0000
committerDmitry Sharshakov2021-08-22 05:31:01 +0000
commit89ad54a2e5e6060cf1de91dba3e79d76d048bdaf (patch)
treeea27423e2bf798fdbaeb7b64a1ae404cafdeda1d
parentcc66475592c5316634859746dd96920afbd6da55 (diff)
Add variable type to output
-rw-r--r--helix-term/src/commands.rs6
1 files changed, 5 insertions, 1 deletions
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 @@ mod cmd {
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
}