diff options
author | Dmitry Sharshakov | 2021-08-22 05:31:01 +0000 |
---|---|---|
committer | Dmitry Sharshakov | 2021-08-22 05:31:01 +0000 |
commit | 89ad54a2e5e6060cf1de91dba3e79d76d048bdaf (patch) | |
tree | ea27423e2bf798fdbaeb7b64a1ae404cafdeda1d /helix-term | |
parent | cc66475592c5316634859746dd96920afbd6da55 (diff) |
Add variable type to output
Diffstat (limited to 'helix-term')
-rw-r--r-- | helix-term/src/commands.rs | 6 |
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 } |