mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-24 21:57:41 +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()
|
.into_iter()
|
||||||
.map(|el| {
|
.map(|el| {
|
||||||
match 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) => {
|
FormatElement::TextGroup(textgroup) => {
|
||||||
let textgroup = TextGroup {
|
let textgroup = TextGroup {
|
||||||
format: textgroup.format,
|
format: textgroup.format,
|
||||||
|
Loading…
Reference in New Issue
Block a user