2022-03-26 09:42:19 +00:00
|
|
|
use serde::{Deserialize, Serialize};
|
2021-02-20 14:40:49 +00:00
|
|
|
|
2022-03-26 09:42:19 +00:00
|
|
|
#[derive(Clone, Deserialize, Serialize)]
|
|
|
|
#[serde(default)]
|
2021-02-20 14:40:49 +00:00
|
|
|
pub struct ShellConfig<'a> {
|
|
|
|
pub format: &'a str,
|
|
|
|
pub bash_indicator: &'a str,
|
|
|
|
pub fish_indicator: &'a str,
|
|
|
|
pub zsh_indicator: &'a str,
|
|
|
|
pub powershell_indicator: &'a str,
|
|
|
|
pub ion_indicator: &'a str,
|
|
|
|
pub elvish_indicator: &'a str,
|
2021-02-27 18:55:27 +00:00
|
|
|
pub tcsh_indicator: &'a str,
|
2021-07-04 19:32:58 +00:00
|
|
|
pub nu_indicator: &'a str,
|
2021-07-16 19:25:01 +00:00
|
|
|
pub xonsh_indicator: &'a str,
|
2022-01-10 05:47:53 +00:00
|
|
|
pub cmd_indicator: &'a str,
|
2021-04-30 18:48:05 +00:00
|
|
|
pub unknown_indicator: &'a str,
|
2021-10-04 17:46:33 +00:00
|
|
|
pub style: &'a str,
|
2021-02-20 14:40:49 +00:00
|
|
|
pub disabled: bool,
|
|
|
|
}
|
|
|
|
|
2021-03-15 10:40:52 +00:00
|
|
|
impl<'a> Default for ShellConfig<'a> {
|
|
|
|
fn default() -> Self {
|
2021-02-20 14:40:49 +00:00
|
|
|
ShellConfig {
|
2021-10-04 17:46:33 +00:00
|
|
|
format: "[$indicator]($style) ",
|
2021-02-20 14:40:49 +00:00
|
|
|
bash_indicator: "bsh",
|
|
|
|
fish_indicator: "fsh",
|
|
|
|
zsh_indicator: "zsh",
|
|
|
|
powershell_indicator: "psh",
|
|
|
|
ion_indicator: "ion",
|
|
|
|
elvish_indicator: "esh",
|
2021-02-27 18:55:27 +00:00
|
|
|
tcsh_indicator: "tsh",
|
2021-07-04 19:32:58 +00:00
|
|
|
nu_indicator: "nu",
|
2021-07-16 19:25:01 +00:00
|
|
|
xonsh_indicator: "xsh",
|
2022-01-10 05:47:53 +00:00
|
|
|
cmd_indicator: "cmd",
|
2021-04-30 18:48:05 +00:00
|
|
|
unknown_indicator: "",
|
2021-10-04 17:46:33 +00:00
|
|
|
style: "white bold",
|
2021-02-20 14:40:49 +00:00
|
|
|
disabled: true,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|