mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
eec961caaf
* first (crude) attempt to implement the openstack module * Attempt to follow OpenStack standards for clouds.yaml location * fmt * provide unittest * add documentation * fix fmt * fix clippy * fix clippy * fix fmt * fix small nitpicks * expand openstack explanation * load config file using find_map * fix fmt * add test for valid config, plus fix test for invalid config * fix fmt * re-add forgotten comment
22 lines
535 B
Rust
22 lines
535 B
Rust
use crate::config::{ModuleConfig, RootModuleConfig};
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
#[derive(Clone, ModuleConfig)]
|
|
pub struct OspConfig<'a> {
|
|
pub format: &'a str,
|
|
pub symbol: &'a str,
|
|
pub style: &'a str,
|
|
pub disabled: bool,
|
|
}
|
|
|
|
impl<'a> RootModuleConfig<'a> for OspConfig<'a> {
|
|
fn new() -> Self {
|
|
OspConfig {
|
|
format: "on [$symbol$cloud(\\($project\\))]($style) ",
|
|
symbol: "☁️ ",
|
|
style: "bold yellow",
|
|
disabled: false,
|
|
}
|
|
}
|
|
}
|