Skip to content
Snippets Groups Projects
Verified Commit 095a4bbd authored by Tom Almeida's avatar Tom Almeida
Browse files

Allow for empty arrays when printing all variables

parent 918e1fc4
No related branches found
No related tags found
No related merge requests found
......@@ -36,8 +36,10 @@ fn list_vars(shell: &Shell) {
});
}
let _ = buffer.write(b"]\n");
} else {
} else if array.len() == 1 {
let _ = buffer.write(["'", &array[0], "' ]\n"].concat().as_bytes());
} else {
let _ = buffer.write("]\n".as_bytes());
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment