mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-15 17:47:13 +00:00
d3100c5c82
Previously, all modules would have prefixes, which lead to the first module having a dangling prefix. This change ensures that the first few modules would instead have suffixes so that we don't start or end with a prefix or suffix.
26 lines
682 B
Rust
26 lines
682 B
Rust
use crate::config::{ModuleConfig, RootModuleConfig};
|
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
use std::collections::HashMap;
|
|
|
|
#[derive(Clone, ModuleConfig)]
|
|
pub struct KubernetesConfig<'a> {
|
|
pub symbol: &'a str,
|
|
pub format: &'a str,
|
|
pub style: &'a str,
|
|
pub disabled: bool,
|
|
pub context_aliases: HashMap<String, &'a str>,
|
|
}
|
|
|
|
impl<'a> RootModuleConfig<'a> for KubernetesConfig<'a> {
|
|
fn new() -> Self {
|
|
KubernetesConfig {
|
|
symbol: "☸ ",
|
|
format: "[$symbol$context( \\($namespace\\))]($style) in ",
|
|
style: "cyan bold",
|
|
disabled: true,
|
|
context_aliases: HashMap::new(),
|
|
}
|
|
}
|
|
}
|