1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-25 11:20:01 +00:00

fix(buf): broken icon on windows 10 (#4689)

Closes https://github.com/starship/starship/issues/4608
This commit is contained in:
Dennis Waitong Lam 2022-12-09 04:41:59 -05:00 committed by GitHub
parent c9de67bd66
commit 7341607c29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 6 deletions

View File

@ -73,7 +73,7 @@
"disabled": false,
"format": "with [$symbol($version )]($style)",
"style": "bold blue",
"symbol": "🦬 ",
"symbol": "🐃 ",
"version_format": "v${raw}"
},
"allOf": [
@ -1854,7 +1854,7 @@
"type": "string"
},
"symbol": {
"default": "🦬 ",
"default": "🐃 ",
"type": "string"
},
"style": {

View File

@ -558,7 +558,7 @@ The `buf` module shows the currently installed version of [Buf](https://buf.buil
| ------------------- | ----------------------------------------------- | ----------------------------------------------------- |
| `format` | `'with [$symbol($version )]($style)'` | The format for the `buf` module. |
| `version_format` | `'v${raw}'` | The version format. |
| `symbol` | `'🦬 '` | The symbol used before displaying the version of Buf. |
| `symbol` | `'🐃 '` | The symbol used before displaying the version of Buf. |
| `detect_extensions` | `[]` | Which extensions should trigger this module. |
| `detect_files` | `['buf.yaml', 'buf.gen.yaml', 'buf.work.yaml']` | Which filenames should trigger this module. |
| `detect_folders` | `[]` | Which folders should trigger this modules. |

View File

@ -23,7 +23,7 @@ impl<'a> Default for BufConfig<'a> {
BufConfig {
format: "with [$symbol($version )]($style)",
version_format: "v${raw}",
symbol: "🦬 ",
symbol: "🐃 ",
style: "bold blue",
disabled: false,
detect_extensions: vec![],

View File

@ -1,5 +1,4 @@
use super::{Context, Module, ModuleConfig};
use crate::configs::buf::BufConfig;
use crate::formatter::StringFormatter;
use crate::formatter::VersionFormatter;
@ -103,8 +102,10 @@ mod tests {
.sync_all()
.unwrap();
let actual = ModuleRenderer::new("buf").path(dir.path()).collect();
let expected = Some(format!("with {}", Color::Blue.bold().paint("🦬 v1.0.0 ")));
let expected = Some(format!("with {}", Color::Blue.bold().paint("🐃 v1.0.0 ")));
assert_eq!(expected, actual);
dir.close().unwrap();
}