mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-24 13:47:38 +00:00
fix: escape text segments in meta variables (#3563)
This commit is contained in:
parent
7c06520f8f
commit
7d31bac1cc
@ -292,7 +292,16 @@ impl<'a> StringFormatter<'a> {
|
||||
.into_iter()
|
||||
.map(|el| {
|
||||
match el {
|
||||
FormatElement::Text(text) => Ok(Segment::from_text(style, text)),
|
||||
FormatElement::Text(text) => Ok(Segment::from_text(
|
||||
style,
|
||||
shell_prompt_escape(
|
||||
text,
|
||||
match context {
|
||||
None => Shell::Unknown,
|
||||
Some(c) => c.shell,
|
||||
},
|
||||
),
|
||||
)),
|
||||
FormatElement::TextGroup(textgroup) => {
|
||||
let textgroup = TextGroup {
|
||||
format: textgroup.format,
|
||||
|
Loading…
Reference in New Issue
Block a user