mirror of
https://github.com/starship/starship.git
synced 2024-11-23 00:33:16 +01:00
fix(cmake): Change cmake symbol to unicode triangle (#2456)
This commit is contained in:
parent
49c09d493a
commit
c91b293c9d
@ -458,7 +458,7 @@ the module will be activated if any of the following conditions are met:
|
|||||||
| Option | Default | Description |
|
| Option | Default | Description |
|
||||||
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
| ------------------- | -------------------------------------- | -------------------------------------------- |
|
||||||
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
|
||||||
| `symbol` | `"喝 "` | The symbol used before the version of cmake. |
|
| `symbol` | `"△ "` | The symbol used before the version of cmake. |
|
||||||
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
| `detect_extensions` | `[]` | Which extensions should trigger this moudle |
|
||||||
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
| `detect_files` | `["CMakeLists.txt", "CMakeCache.txt"]` | Which filenames should trigger this module |
|
||||||
| `detect_folders` | `[]` | Which folders should trigger this module |
|
| `detect_folders` | `[]` | Which folders should trigger this module |
|
||||||
|
@ -17,7 +17,7 @@ impl<'a> RootModuleConfig<'a> for CMakeConfig<'a> {
|
|||||||
fn new() -> Self {
|
fn new() -> Self {
|
||||||
CMakeConfig {
|
CMakeConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
symbol: "喝 ",
|
symbol: "△ ",
|
||||||
style: "bold blue",
|
style: "bold blue",
|
||||||
disabled: false,
|
disabled: false,
|
||||||
detect_extensions: vec![],
|
detect_extensions: vec![],
|
||||||
|
@ -77,7 +77,7 @@ mod tests {
|
|||||||
let dir = tempfile::tempdir()?;
|
let dir = tempfile::tempdir()?;
|
||||||
File::create(dir.path().join("CMakeLists.txt"))?.sync_all()?;
|
File::create(dir.path().join("CMakeLists.txt"))?.sync_all()?;
|
||||||
let actual = ModuleRenderer::new("cmake").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("cmake").path(dir.path()).collect();
|
||||||
let expected = Some(format!("via {}", Color::Blue.bold().paint("喝 v3.17.3 ")));
|
let expected = Some(format!("via {}", Color::Blue.bold().paint("△ v3.17.3 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
@ -87,7 +87,7 @@ mod tests {
|
|||||||
let dir = tempfile::tempdir()?;
|
let dir = tempfile::tempdir()?;
|
||||||
File::create(dir.path().join("CMakeCache.txt"))?.sync_all()?;
|
File::create(dir.path().join("CMakeCache.txt"))?.sync_all()?;
|
||||||
let actual = ModuleRenderer::new("cmake").path(dir.path()).collect();
|
let actual = ModuleRenderer::new("cmake").path(dir.path()).collect();
|
||||||
let expected = Some(format!("via {}", Color::Blue.bold().paint("喝 v3.17.3 ")));
|
let expected = Some(format!("via {}", Color::Blue.bold().paint("△ v3.17.3 ")));
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
dir.close()
|
dir.close()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user