Create dialoguer themes based on global config
Dependencies
- [2]
ZSFJT4SFAllow remotes to have a different push and pull address - [3]
IUGP6ZGBAdd support for ~/.config/pijul even on macos - [4]
5BB266P6Optional colours in the global config file - [5]
A3RM526YIntegrating identity malleability - [6]
SXEYMYF7Fixing the bad changes in history (unfortunately, by rebooting). - [7]
CCLLB7OIUpgrading to Sanakirja 0.15 + version bump - [8]
SEWGHUHQ.pijul/config: simplify remotes and hooks - [9]
EEBKW7VTKeys and identities - [*]
L4JXJHWXpijul/*: reorganize imports and remove extern crate - [*]
TFPETWTVAdd config options for patch message templates
Change contents
- edit in pijul/src/config.rs at line 6
use dialoguer::theme; - replacement in pijul/src/config.rs at line 22
pub key_path: Option<String>,pub name: String,// This is for backwards compatability with older versions#[serde(alias = "name")]pub login: String, - edit in pijul/src/config.rs at line 39[12.66][12.66]
impl Default for Choice {fn default() -> Self {Self::Auto}} - replacement in pijul/src/config.rs at line 55
if let Some(mut dir) = dirs_next::config_dir() {if let Ok(path) = std::env::var("PIJUL_CONFIG_DIR") {let dir = std::path::PathBuf::from(path);Some(dir)} else if let Some(mut dir) = dirs_next::config_dir() { - replacement in pijul/src/config.rs at line 109
#[derive(Debug, Deserialize, Default)]#[derive(Debug, Serialize, Deserialize, Default)] - replacement in pijul/src/config.rs at line 123
#[derive(Debug)]#[derive(Debug, Serialize)] - replacement in pijul/src/config.rs at line 187
#[derive(Debug, Deserialize)]#[derive(Debug, Serialize, Deserialize)] - edit in pijul/src/config.rs at line 319
}}/// Choose the right dialoguer theme based on user's configpub fn load_theme() -> Result<Box<dyn theme::Theme>, anyhow::Error> {if let Ok((config, _)) = Global::load() {let color_choice = config.colors.unwrap_or_default();match color_choice {Choice::Auto | Choice::Always => Ok(Box::new(theme::ColorfulTheme::default())),Choice::Never => Ok(Box::new(theme::SimpleTheme)),}} else {Ok(Box::new(theme::ColorfulTheme::default()))