1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-06-02 00:20:51 +00:00
starship/src/configs/fossil_branch.rs
Vegard Skui 41eb98b310
feat(fossil_branch): add fossil_branch module (#4806)
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2023-01-31 09:06:46 +01:00

31 lines
762 B
Rust

use serde::{Deserialize, Serialize};
#[derive(Clone, Deserialize, Serialize)]
#[cfg_attr(
feature = "config-schema",
derive(schemars::JsonSchema),
schemars(deny_unknown_fields)
)]
#[serde(default)]
pub struct FossilBranchConfig<'a> {
pub format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub truncation_length: i64,
pub truncation_symbol: &'a str,
pub disabled: bool,
}
impl<'a> Default for FossilBranchConfig<'a> {
fn default() -> Self {
FossilBranchConfig {
format: "on [$symbol$branch]($style) ",
symbol: "",
style: "bold purple",
truncation_length: std::i64::MAX,
truncation_symbol: "",
disabled: true,
}
}
}