1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-10 04:12:20 +00:00
starship/src/configs/pulumi.rs

31 lines
736 B
Rust
Raw Permalink Normal View History

use serde::{Deserialize, Serialize};
2021-10-05 23:27:25 +00:00
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(
feature = "config-schema",
derive(schemars::JsonSchema),
schemars(deny_unknown_fields)
)]
#[serde(default)]
2021-10-05 23:27:25 +00:00
pub struct PulumiConfig<'a> {
pub format: &'a str,
pub version_format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub disabled: bool,
pub search_upwards: bool,
2021-10-05 23:27:25 +00:00
}
impl<'a> Default for PulumiConfig<'a> {
fn default() -> Self {
PulumiConfig {
format: "via [$symbol($username@)$stack]($style) ",
2021-10-05 23:27:25 +00:00
version_format: "v${raw}",
symbol: "",
style: "bold 5",
disabled: false,
search_upwards: true,
2021-10-05 23:27:25 +00:00
}
}
}