mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
fix(dotnet): make default format consistent with other modules (#2853)
Add via prefix to dotnet modules' default format config.
This commit is contained in:
@@ -19,7 +19,7 @@ pub struct DotnetConfig<'a> {
|
||||
impl<'a> Default for DotnetConfig<'a> {
|
||||
fn default() -> Self {
|
||||
DotnetConfig {
|
||||
format: "[$symbol($version )(🎯 $tfm )]($style)",
|
||||
format: "via [$symbol($version )(🎯 $tfm )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: ".NET ",
|
||||
style: "blue bold",
|
||||
|
||||
+30
-12
@@ -364,7 +364,10 @@ mod tests {
|
||||
touch_path(&workspace, "Directory.Build.props", None)?;
|
||||
expect_output(
|
||||
&workspace.path(),
|
||||
Some(format!("{}", Color::Blue.bold().paint(".NET v3.1.103 "))),
|
||||
Some(format!(
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v3.1.103 ")
|
||||
)),
|
||||
);
|
||||
workspace.close()
|
||||
}
|
||||
@@ -375,7 +378,10 @@ mod tests {
|
||||
touch_path(&workspace, "Directory.Build.targets", None)?;
|
||||
expect_output(
|
||||
&workspace.path(),
|
||||
Some(format!("{}", Color::Blue.bold().paint(".NET v3.1.103 "))),
|
||||
Some(format!(
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v3.1.103 ")
|
||||
)),
|
||||
);
|
||||
workspace.close()
|
||||
}
|
||||
@@ -386,7 +392,10 @@ mod tests {
|
||||
touch_path(&workspace, "Packages.props", None)?;
|
||||
expect_output(
|
||||
&workspace.path(),
|
||||
Some(format!("{}", Color::Blue.bold().paint(".NET v3.1.103 "))),
|
||||
Some(format!(
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v3.1.103 ")
|
||||
)),
|
||||
);
|
||||
workspace.close()
|
||||
}
|
||||
@@ -407,7 +416,7 @@ mod tests {
|
||||
expect_output(
|
||||
&workspace.path(),
|
||||
Some(format!(
|
||||
"{}",
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v3.1.103 🎯 netstandard2.0 ")
|
||||
)),
|
||||
);
|
||||
@@ -420,7 +429,10 @@ mod tests {
|
||||
touch_path(&workspace, "project.fsproj", None)?;
|
||||
expect_output(
|
||||
&workspace.path(),
|
||||
Some(format!("{}", Color::Blue.bold().paint(".NET v3.1.103 "))),
|
||||
Some(format!(
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v3.1.103 ")
|
||||
)),
|
||||
);
|
||||
workspace.close()
|
||||
}
|
||||
@@ -431,7 +443,10 @@ mod tests {
|
||||
touch_path(&workspace, "project.xproj", None)?;
|
||||
expect_output(
|
||||
&workspace.path(),
|
||||
Some(format!("{}", Color::Blue.bold().paint(".NET v3.1.103 "))),
|
||||
Some(format!(
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v3.1.103 ")
|
||||
)),
|
||||
);
|
||||
workspace.close()
|
||||
}
|
||||
@@ -442,7 +457,10 @@ mod tests {
|
||||
touch_path(&workspace, "project.json", None)?;
|
||||
expect_output(
|
||||
&workspace.path(),
|
||||
Some(format!("{}", Color::Blue.bold().paint(".NET v3.1.103 "))),
|
||||
Some(format!(
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v3.1.103 ")
|
||||
)),
|
||||
);
|
||||
workspace.close()
|
||||
}
|
||||
@@ -454,7 +472,7 @@ mod tests {
|
||||
touch_path(&workspace, "global.json", Some(&global_json))?;
|
||||
expect_output(
|
||||
&workspace.path(),
|
||||
Some(format!("{}", Color::Blue.bold().paint(".NET v1.2.3 "))),
|
||||
Some(format!("via {}", Color::Blue.bold().paint(".NET v1.2.3 "))),
|
||||
);
|
||||
workspace.close()
|
||||
}
|
||||
@@ -469,7 +487,7 @@ mod tests {
|
||||
expect_output(
|
||||
&workspace.path().join("project"),
|
||||
Some(format!(
|
||||
"{}",
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v1.2.3 🎯 netstandard2.0 ")
|
||||
)),
|
||||
);
|
||||
@@ -490,7 +508,7 @@ mod tests {
|
||||
expect_output(
|
||||
&workspace.path().join("deep/path/to/project"),
|
||||
Some(format!(
|
||||
"{}",
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v1.2.3 🎯 netstandard2.0 ")
|
||||
)),
|
||||
);
|
||||
@@ -505,7 +523,7 @@ mod tests {
|
||||
expect_output(
|
||||
workspace.path(),
|
||||
Some(format!(
|
||||
"{}",
|
||||
"via {}",
|
||||
Color::Blue.bold().paint(".NET v3.1.103 🎯 netstandard2.0 ")
|
||||
)),
|
||||
);
|
||||
@@ -520,7 +538,7 @@ mod tests {
|
||||
expect_output(
|
||||
workspace.path(),
|
||||
Some(format!(
|
||||
"{}",
|
||||
"via {}",
|
||||
Color::Blue
|
||||
.bold()
|
||||
.paint(".NET v3.1.103 🎯 netstandard2.0;net461 ")
|
||||
|
||||
Reference in New Issue
Block a user