mirror of
https://github.com/Llewellynvdm/starship.git
synced 2025-01-15 11:17:00 +00:00
Compare commits
4 Commits
d0c2ead98b
...
34a96439b2
Author | SHA1 | Date | |
---|---|---|---|
|
34a96439b2 | ||
|
b5e865ae7d | ||
|
3b43b6be52 | ||
|
6678c13c24 |
@ -7,6 +7,9 @@ symbol = " "
|
|||||||
[c]
|
[c]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
|
[cmake]
|
||||||
|
symbol = " "
|
||||||
|
|
||||||
[conda]
|
[conda]
|
||||||
symbol = " "
|
symbol = " "
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ pub struct AwsConfig<'a> {
|
|||||||
pub force_display: bool,
|
pub force_display: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for AwsConfig<'a> {
|
impl Default for AwsConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
AwsConfig {
|
AwsConfig {
|
||||||
format: "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
format: "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
||||||
|
@ -16,7 +16,7 @@ pub struct AzureConfig<'a> {
|
|||||||
pub subscription_aliases: HashMap<String, &'a str>,
|
pub subscription_aliases: HashMap<String, &'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for AzureConfig<'a> {
|
impl Default for AzureConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
AzureConfig {
|
AzureConfig {
|
||||||
format: "on [$symbol($subscription)]($style) ",
|
format: "on [$symbol($subscription)]($style) ",
|
||||||
|
@ -19,7 +19,7 @@ pub struct BatteryConfig<'a> {
|
|||||||
pub format: &'a str,
|
pub format: &'a str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for BatteryConfig<'a> {
|
impl Default for BatteryConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
BatteryConfig {
|
BatteryConfig {
|
||||||
full_symbol: " ",
|
full_symbol: " ",
|
||||||
@ -48,7 +48,7 @@ pub struct BatteryDisplayConfig<'a> {
|
|||||||
pub discharging_symbol: Option<&'a str>,
|
pub discharging_symbol: Option<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for BatteryDisplayConfig<'a> {
|
impl Default for BatteryDisplayConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
BatteryDisplayConfig {
|
BatteryDisplayConfig {
|
||||||
threshold: 10,
|
threshold: 10,
|
||||||
|
@ -18,7 +18,7 @@ pub struct BufConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for BufConfig<'a> {
|
impl Default for BufConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
BufConfig {
|
BufConfig {
|
||||||
format: "with [$symbol($version )]($style)",
|
format: "with [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct BunConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for BunConfig<'a> {
|
impl Default for BunConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
BunConfig {
|
BunConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -19,7 +19,7 @@ pub struct CConfig<'a> {
|
|||||||
pub commands: Vec<Vec<&'a str>>,
|
pub commands: Vec<Vec<&'a str>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for CConfig<'a> {
|
impl Default for CConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
CConfig {
|
CConfig {
|
||||||
format: "via [$symbol($version(-$name) )]($style)",
|
format: "via [$symbol($version(-$name) )]($style)",
|
||||||
|
@ -19,7 +19,7 @@ pub struct CharacterConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for CharacterConfig<'a> {
|
impl Default for CharacterConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
CharacterConfig {
|
CharacterConfig {
|
||||||
format: "$symbol ",
|
format: "$symbol ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct CMakeConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for CMakeConfig<'a> {
|
impl Default for CMakeConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
CMakeConfig {
|
CMakeConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -20,7 +20,7 @@ pub struct CmdDurationConfig<'a> {
|
|||||||
pub notification_timeout: Option<u32>,
|
pub notification_timeout: Option<u32>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for CmdDurationConfig<'a> {
|
impl Default for CmdDurationConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
CmdDurationConfig {
|
CmdDurationConfig {
|
||||||
min_time: 2_000,
|
min_time: 2_000,
|
||||||
|
@ -18,7 +18,7 @@ pub struct CobolConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for CobolConfig<'a> {
|
impl Default for CobolConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
CobolConfig {
|
CobolConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -16,7 +16,7 @@ pub struct CondaConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for CondaConfig<'a> {
|
impl Default for CondaConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
CondaConfig {
|
CondaConfig {
|
||||||
truncation_length: 1,
|
truncation_length: 1,
|
||||||
|
@ -14,7 +14,7 @@ pub struct ContainerConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for ContainerConfig<'a> {
|
impl Default for ContainerConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
ContainerConfig {
|
ContainerConfig {
|
||||||
format: "[$symbol \\[$name\\]]($style) ",
|
format: "[$symbol \\[$name\\]]($style) ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct CrystalConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for CrystalConfig<'a> {
|
impl Default for CrystalConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
CrystalConfig {
|
CrystalConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -33,7 +33,7 @@ pub struct CustomConfig<'a> {
|
|||||||
pub unsafe_no_escape: bool,
|
pub unsafe_no_escape: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for CustomConfig<'a> {
|
impl Default for CustomConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
CustomConfig {
|
CustomConfig {
|
||||||
format: "[$symbol($output )]($style)",
|
format: "[$symbol($output )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct DamlConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for DamlConfig<'a> {
|
impl Default for DamlConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
DamlConfig {
|
DamlConfig {
|
||||||
symbol: "Λ ",
|
symbol: "Λ ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct DartConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for DartConfig<'a> {
|
impl Default for DartConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
DartConfig {
|
DartConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct DenoConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for DenoConfig<'a> {
|
impl Default for DenoConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
DenoConfig {
|
DenoConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -28,7 +28,7 @@ pub struct DirectoryConfig<'a> {
|
|||||||
pub use_os_path_sep: bool,
|
pub use_os_path_sep: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for DirectoryConfig<'a> {
|
impl Default for DirectoryConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
DirectoryConfig {
|
DirectoryConfig {
|
||||||
truncation_length: 3,
|
truncation_length: 3,
|
||||||
|
@ -23,7 +23,7 @@ pub struct DirenvConfig<'a> {
|
|||||||
pub unloaded_msg: &'a str,
|
pub unloaded_msg: &'a str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for DirenvConfig<'a> {
|
impl Default for DirenvConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self {
|
Self {
|
||||||
format: "[$symbol$loaded/$allowed]($style) ",
|
format: "[$symbol$loaded/$allowed]($style) ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct DockerContextConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for DockerContextConfig<'a> {
|
impl Default for DockerContextConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
DockerContextConfig {
|
DockerContextConfig {
|
||||||
symbol: "🐳 ",
|
symbol: "🐳 ",
|
||||||
|
@ -19,7 +19,7 @@ pub struct DotnetConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for DotnetConfig<'a> {
|
impl Default for DotnetConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
DotnetConfig {
|
DotnetConfig {
|
||||||
format: "via [$symbol($version )(🎯 $tfm )]($style)",
|
format: "via [$symbol($version )(🎯 $tfm )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct ElixirConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for ElixirConfig<'a> {
|
impl Default for ElixirConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
ElixirConfig {
|
ElixirConfig {
|
||||||
format: "via [$symbol($version \\(OTP $otp_version\\) )]($style)",
|
format: "via [$symbol($version \\(OTP $otp_version\\) )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct ElmConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for ElmConfig<'a> {
|
impl Default for ElmConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
ElmConfig {
|
ElmConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -19,7 +19,7 @@ pub struct EnvVarConfig<'a> {
|
|||||||
pub description: &'a str,
|
pub description: &'a str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for EnvVarConfig<'a> {
|
impl Default for EnvVarConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
EnvVarConfig {
|
EnvVarConfig {
|
||||||
symbol: "",
|
symbol: "",
|
||||||
|
@ -18,7 +18,7 @@ pub struct ErlangConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for ErlangConfig<'a> {
|
impl Default for ErlangConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
ErlangConfig {
|
ErlangConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -19,7 +19,7 @@ pub struct FennelConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for FennelConfig<'a> {
|
impl Default for FennelConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
FennelConfig {
|
FennelConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -13,7 +13,7 @@ pub struct FillConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for FillConfig<'a> {
|
impl Default for FillConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
FillConfig {
|
FillConfig {
|
||||||
style: "bold black",
|
style: "bold black",
|
||||||
|
@ -16,7 +16,7 @@ pub struct FossilBranchConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for FossilBranchConfig<'a> {
|
impl Default for FossilBranchConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
FossilBranchConfig {
|
FossilBranchConfig {
|
||||||
format: "on [$symbol$branch]($style) ",
|
format: "on [$symbol$branch]($style) ",
|
||||||
|
@ -15,7 +15,7 @@ pub struct FossilMetricsConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for FossilMetricsConfig<'a> {
|
impl Default for FossilMetricsConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
FossilMetricsConfig {
|
FossilMetricsConfig {
|
||||||
format: "([+$added]($added_style) )([-$deleted]($deleted_style) )",
|
format: "([+$added]($added_style) )([-$deleted]($deleted_style) )",
|
||||||
|
@ -18,7 +18,7 @@ pub struct GcloudConfig<'a> {
|
|||||||
pub detect_env_vars: Vec<&'a str>,
|
pub detect_env_vars: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GcloudConfig<'a> {
|
impl Default for GcloudConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GcloudConfig {
|
GcloudConfig {
|
||||||
format: "on [$symbol$account(@$domain)(\\($region\\))]($style) ",
|
format: "on [$symbol$account(@$domain)(\\($region\\))]($style) ",
|
||||||
|
@ -19,7 +19,7 @@ pub struct GitBranchConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GitBranchConfig<'a> {
|
impl Default for GitBranchConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GitBranchConfig {
|
GitBranchConfig {
|
||||||
format: "on [$symbol$branch(:$remote_branch)]($style) ",
|
format: "on [$symbol$branch(:$remote_branch)]($style) ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct GitCommitConfig<'a> {
|
|||||||
pub tag_max_candidates: usize,
|
pub tag_max_candidates: usize,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GitCommitConfig<'a> {
|
impl Default for GitCommitConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GitCommitConfig {
|
GitCommitConfig {
|
||||||
// be consistent with git by default, which has DEFAULT_ABBREV set to 7
|
// be consistent with git by default, which has DEFAULT_ABBREV set to 7
|
||||||
|
@ -16,7 +16,7 @@ pub struct GitMetricsConfig<'a> {
|
|||||||
pub ignore_submodules: bool,
|
pub ignore_submodules: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GitMetricsConfig<'a> {
|
impl Default for GitMetricsConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GitMetricsConfig {
|
GitMetricsConfig {
|
||||||
added_style: "bold green",
|
added_style: "bold green",
|
||||||
|
@ -20,7 +20,7 @@ pub struct GitStateConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GitStateConfig<'a> {
|
impl Default for GitStateConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GitStateConfig {
|
GitStateConfig {
|
||||||
rebase: "REBASING",
|
rebase: "REBASING",
|
||||||
|
@ -28,7 +28,7 @@ pub struct GitStatusConfig<'a> {
|
|||||||
pub windows_starship: Option<&'a str>,
|
pub windows_starship: Option<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GitStatusConfig<'a> {
|
impl Default for GitStatusConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GitStatusConfig {
|
GitStatusConfig {
|
||||||
format: "([\\[$all_status$ahead_behind\\]]($style) )",
|
format: "([\\[$all_status$ahead_behind\\]]($style) )",
|
||||||
|
@ -18,7 +18,7 @@ pub struct GleamConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GleamConfig<'a> {
|
impl Default for GleamConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GleamConfig {
|
GleamConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -19,7 +19,7 @@ pub struct GoConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GoConfig<'a> {
|
impl Default for GoConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GoConfig {
|
GoConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -19,7 +19,7 @@ pub struct GradleConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GradleConfig<'a> {
|
impl Default for GradleConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GradleConfig {
|
GradleConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -14,7 +14,7 @@ pub struct GuixShellConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for GuixShellConfig<'a> {
|
impl Default for GuixShellConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
GuixShellConfig {
|
GuixShellConfig {
|
||||||
format: "via [$symbol]($style) ",
|
format: "via [$symbol]($style) ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct HaskellConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for HaskellConfig<'a> {
|
impl Default for HaskellConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
HaskellConfig {
|
HaskellConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct HaxeConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for HaxeConfig<'a> {
|
impl Default for HaxeConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
HaxeConfig {
|
HaxeConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct HelmConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for HelmConfig<'a> {
|
impl Default for HelmConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
HelmConfig {
|
HelmConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -16,7 +16,7 @@ pub struct HgBranchConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for HgBranchConfig<'a> {
|
impl Default for HgBranchConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
HgBranchConfig {
|
HgBranchConfig {
|
||||||
symbol: " ",
|
symbol: " ",
|
||||||
|
@ -19,7 +19,7 @@ pub struct HostnameConfig<'a> {
|
|||||||
pub aliases: IndexMap<String, &'a str>,
|
pub aliases: IndexMap<String, &'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for HostnameConfig<'a> {
|
impl Default for HostnameConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
HostnameConfig {
|
HostnameConfig {
|
||||||
ssh_only: true,
|
ssh_only: true,
|
||||||
|
@ -18,7 +18,7 @@ pub struct JavaConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for JavaConfig<'a> {
|
impl Default for JavaConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
JavaConfig {
|
JavaConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -17,7 +17,7 @@ pub struct JobsConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for JobsConfig<'a> {
|
impl Default for JobsConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
JobsConfig {
|
JobsConfig {
|
||||||
threshold: 1,
|
threshold: 1,
|
||||||
|
@ -18,7 +18,7 @@ pub struct JuliaConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for JuliaConfig<'a> {
|
impl Default for JuliaConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
JuliaConfig {
|
JuliaConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -19,7 +19,7 @@ pub struct KotlinConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for KotlinConfig<'a> {
|
impl Default for KotlinConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
KotlinConfig {
|
KotlinConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -22,7 +22,7 @@ pub struct KubernetesConfig<'a> {
|
|||||||
pub contexts: Vec<KubernetesContextConfig<'a>>,
|
pub contexts: Vec<KubernetesContextConfig<'a>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for KubernetesConfig<'a> {
|
impl Default for KubernetesConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
KubernetesConfig {
|
KubernetesConfig {
|
||||||
symbol: "☸ ",
|
symbol: "☸ ",
|
||||||
|
@ -14,7 +14,7 @@ pub struct LocalipConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for LocalipConfig<'a> {
|
impl Default for LocalipConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
LocalipConfig {
|
LocalipConfig {
|
||||||
ssh_only: true,
|
ssh_only: true,
|
||||||
|
@ -19,7 +19,7 @@ pub struct LuaConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for LuaConfig<'a> {
|
impl Default for LuaConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
LuaConfig {
|
LuaConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -15,7 +15,7 @@ pub struct MemoryConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for MemoryConfig<'a> {
|
impl Default for MemoryConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
MemoryConfig {
|
MemoryConfig {
|
||||||
threshold: 75,
|
threshold: 75,
|
||||||
|
@ -16,7 +16,7 @@ pub struct MesonConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for MesonConfig<'a> {
|
impl Default for MesonConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
MesonConfig {
|
MesonConfig {
|
||||||
truncation_length: u32::MAX,
|
truncation_length: u32::MAX,
|
||||||
|
@ -20,7 +20,7 @@ pub struct MojoConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for MojoConfig<'a> {
|
impl Default for MojoConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
MojoConfig {
|
MojoConfig {
|
||||||
format: "with [$symbol($version )]($style)",
|
format: "with [$symbol($version )]($style)",
|
||||||
|
@ -14,7 +14,7 @@ pub struct NatsConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for NatsConfig<'a> {
|
impl Default for NatsConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
NatsConfig {
|
NatsConfig {
|
||||||
format: "[$symbol($name )]($style)",
|
format: "[$symbol($name )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct NimConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for NimConfig<'a> {
|
impl Default for NimConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
NimConfig {
|
NimConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -21,7 +21,7 @@ pub struct NixShellConfig<'a> {
|
|||||||
/* The trailing double spaces in `symbol` are needed to work around issues with
|
/* The trailing double spaces in `symbol` are needed to work around issues with
|
||||||
multiwidth emoji support in some shells. Please do not file a PR to change this
|
multiwidth emoji support in some shells. Please do not file a PR to change this
|
||||||
unless you can show that your changes do not affect this workaround. */
|
unless you can show that your changes do not affect this workaround. */
|
||||||
impl<'a> Default for NixShellConfig<'a> {
|
impl Default for NixShellConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
NixShellConfig {
|
NixShellConfig {
|
||||||
format: "via [$symbol$state( \\($name\\))]($style) ",
|
format: "via [$symbol$state( \\($name\\))]($style) ",
|
||||||
|
@ -19,7 +19,7 @@ pub struct NodejsConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for NodejsConfig<'a> {
|
impl Default for NodejsConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
NodejsConfig {
|
NodejsConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -20,7 +20,7 @@ pub struct OCamlConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for OCamlConfig<'a> {
|
impl Default for OCamlConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
OCamlConfig {
|
OCamlConfig {
|
||||||
format: "via [$symbol($version )(\\($switch_indicator$switch_name\\) )]($style)",
|
format: "via [$symbol($version )(\\($switch_indicator$switch_name\\) )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct OdinConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for OdinConfig<'a> {
|
impl Default for OdinConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
OdinConfig {
|
OdinConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct OpaConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for OpaConfig<'a> {
|
impl Default for OpaConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
OpaConfig {
|
OpaConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -14,7 +14,7 @@ pub struct OspConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for OspConfig<'a> {
|
impl Default for OspConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
OspConfig {
|
OspConfig {
|
||||||
format: "on [$symbol$cloud(\\($project\\))]($style) ",
|
format: "on [$symbol$cloud(\\($project\\))]($style) ",
|
||||||
|
@ -22,7 +22,7 @@ impl<'a> OSConfig<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for OSConfig<'a> {
|
impl Default for OSConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
OSConfig {
|
OSConfig {
|
||||||
format: "[$symbol]($style)",
|
format: "[$symbol]($style)",
|
||||||
|
@ -16,7 +16,7 @@ pub struct PackageConfig<'a> {
|
|||||||
pub version_format: &'a str,
|
pub version_format: &'a str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for PackageConfig<'a> {
|
impl Default for PackageConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
PackageConfig {
|
PackageConfig {
|
||||||
format: "is [$symbol$version]($style) ",
|
format: "is [$symbol$version]($style) ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct PerlConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for PerlConfig<'a> {
|
impl Default for PerlConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
PerlConfig {
|
PerlConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct PhpConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for PhpConfig<'a> {
|
impl Default for PhpConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
PhpConfig {
|
PhpConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -16,7 +16,7 @@ pub struct PijulConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for PijulConfig<'a> {
|
impl Default for PijulConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
PijulConfig {
|
PijulConfig {
|
||||||
symbol: " ",
|
symbol: " ",
|
||||||
|
@ -16,7 +16,7 @@ pub struct PulumiConfig<'a> {
|
|||||||
pub search_upwards: bool,
|
pub search_upwards: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for PulumiConfig<'a> {
|
impl Default for PulumiConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
PulumiConfig {
|
PulumiConfig {
|
||||||
format: "via [$symbol($username@)$stack]($style) ",
|
format: "via [$symbol($username@)$stack]($style) ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct PureScriptConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for PureScriptConfig<'a> {
|
impl Default for PureScriptConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
PureScriptConfig {
|
PureScriptConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -24,7 +24,7 @@ pub struct PythonConfig<'a> {
|
|||||||
pub detect_env_vars: Vec<&'a str>,
|
pub detect_env_vars: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for PythonConfig<'a> {
|
impl Default for PythonConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
PythonConfig {
|
PythonConfig {
|
||||||
pyenv_version_name: false,
|
pyenv_version_name: false,
|
||||||
|
@ -18,7 +18,7 @@ pub struct QuartoConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for QuartoConfig<'a> {
|
impl Default for QuartoConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
QuartoConfig {
|
QuartoConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct RakuConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for RakuConfig<'a> {
|
impl Default for RakuConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
RakuConfig {
|
RakuConfig {
|
||||||
format: "via [$symbol($version-$vm_version )]($style)",
|
format: "via [$symbol($version-$vm_version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct RedConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for RedConfig<'a> {
|
impl Default for RedConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
RedConfig {
|
RedConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct RLangConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for RLangConfig<'a> {
|
impl Default for RLangConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
RLangConfig {
|
RLangConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -19,7 +19,7 @@ pub struct RubyConfig<'a> {
|
|||||||
pub detect_variables: Vec<&'a str>,
|
pub detect_variables: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for RubyConfig<'a> {
|
impl Default for RubyConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
RubyConfig {
|
RubyConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct RustConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for RustConfig<'a> {
|
impl Default for RustConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
RustConfig {
|
RustConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct ScalaConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for ScalaConfig<'a> {
|
impl Default for ScalaConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
ScalaConfig {
|
ScalaConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -26,7 +26,7 @@ pub struct ShellConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for ShellConfig<'a> {
|
impl Default for ShellConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
ShellConfig {
|
ShellConfig {
|
||||||
format: "[$indicator]($style) ",
|
format: "[$indicator]($style) ",
|
||||||
|
@ -17,7 +17,7 @@ pub struct ShLvlConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for ShLvlConfig<'a> {
|
impl Default for ShLvlConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
ShLvlConfig {
|
ShLvlConfig {
|
||||||
threshold: 2,
|
threshold: 2,
|
||||||
|
@ -14,7 +14,7 @@ pub struct SingularityConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for SingularityConfig<'a> {
|
impl Default for SingularityConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
SingularityConfig {
|
SingularityConfig {
|
||||||
format: "[$symbol\\[$env\\]]($style) ",
|
format: "[$symbol\\[$env\\]]($style) ",
|
||||||
|
@ -9,7 +9,6 @@ use crate::config::VecOr;
|
|||||||
schemars(deny_unknown_fields)
|
schemars(deny_unknown_fields)
|
||||||
)]
|
)]
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
|
||||||
pub struct SolidityConfig<'a> {
|
pub struct SolidityConfig<'a> {
|
||||||
pub format: &'a str,
|
pub format: &'a str,
|
||||||
pub version_format: &'a str,
|
pub version_format: &'a str,
|
||||||
@ -22,7 +21,7 @@ pub struct SolidityConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for SolidityConfig<'a> {
|
impl Default for SolidityConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
SolidityConfig {
|
SolidityConfig {
|
||||||
format: "via [$symbol($version)]($style)",
|
format: "via [$symbol($version)]($style)",
|
||||||
|
@ -15,7 +15,7 @@ pub struct SpackConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for SpackConfig<'a> {
|
impl Default for SpackConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
SpackConfig {
|
SpackConfig {
|
||||||
truncation_length: 1,
|
truncation_length: 1,
|
||||||
|
@ -30,7 +30,7 @@ pub struct StatusConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for StatusConfig<'a> {
|
impl Default for StatusConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
StatusConfig {
|
StatusConfig {
|
||||||
format: "[$symbol$status]($style) ",
|
format: "[$symbol$status]($style) ",
|
||||||
|
@ -15,7 +15,7 @@ pub struct SudoConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for SudoConfig<'a> {
|
impl Default for SudoConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
SudoConfig {
|
SudoConfig {
|
||||||
format: "[as $symbol]($style)",
|
format: "[as $symbol]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct SwiftConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for SwiftConfig<'a> {
|
impl Default for SwiftConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
SwiftConfig {
|
SwiftConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct TerraformConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for TerraformConfig<'a> {
|
impl Default for TerraformConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
TerraformConfig {
|
TerraformConfig {
|
||||||
format: "via [$symbol$workspace]($style) ",
|
format: "via [$symbol$workspace]($style) ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct TimeConfig<'a> {
|
|||||||
pub time_range: &'a str,
|
pub time_range: &'a str,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for TimeConfig<'a> {
|
impl Default for TimeConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
TimeConfig {
|
TimeConfig {
|
||||||
format: "at [$time]($style) ",
|
format: "at [$time]($style) ",
|
||||||
|
@ -18,7 +18,7 @@ pub struct TypstConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for TypstConfig<'a> {
|
impl Default for TypstConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
TypstConfig {
|
TypstConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct UsernameConfig<'a> {
|
|||||||
pub aliases: IndexMap<String, &'a str>,
|
pub aliases: IndexMap<String, &'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for UsernameConfig<'a> {
|
impl Default for UsernameConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
UsernameConfig {
|
UsernameConfig {
|
||||||
detect_env_vars: vec![],
|
detect_env_vars: vec![],
|
||||||
|
@ -18,7 +18,7 @@ pub struct VConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for VConfig<'a> {
|
impl Default for VConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
VConfig {
|
VConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -18,7 +18,7 @@ pub struct VagrantConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for VagrantConfig<'a> {
|
impl Default for VagrantConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
VagrantConfig {
|
VagrantConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -14,7 +14,7 @@ pub struct VcshConfig<'a> {
|
|||||||
pub disabled: bool,
|
pub disabled: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for VcshConfig<'a> {
|
impl Default for VcshConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
VcshConfig {
|
VcshConfig {
|
||||||
symbol: "",
|
symbol: "",
|
||||||
|
@ -18,7 +18,7 @@ pub struct ZigConfig<'a> {
|
|||||||
pub detect_folders: Vec<&'a str>,
|
pub detect_folders: Vec<&'a str>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for ZigConfig<'a> {
|
impl Default for ZigConfig<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
ZigConfig {
|
ZigConfig {
|
||||||
format: "via [$symbol($version )]($style)",
|
format: "via [$symbol($version )]($style)",
|
||||||
|
@ -134,7 +134,7 @@ impl<'a> Context<'a> {
|
|||||||
if properties
|
if properties
|
||||||
.pipestatus
|
.pipestatus
|
||||||
.as_deref()
|
.as_deref()
|
||||||
.map_or(false, |p| p.len() == 1 && p[0].is_empty())
|
.is_some_and(|p| p.len() == 1 && p[0].is_empty())
|
||||||
{
|
{
|
||||||
properties.pipestatus = None;
|
properties.pipestatus = None;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@ pub struct Env<'a> {
|
|||||||
_marker: std::marker::PhantomData<&'a ()>,
|
_marker: std::marker::PhantomData<&'a ()>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg_attr(not(test), allow(clippy::needless_lifetimes))]
|
||||||
impl<'a> Env<'a> {
|
impl<'a> Env<'a> {
|
||||||
// Retrieves a environment variable from the os or from a table if in testing mode
|
// Retrieves a environment variable from the os or from a table if in testing mode
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
|
@ -20,7 +20,7 @@ enum VariableValue<'a> {
|
|||||||
Meta(Vec<FormatElement<'a>>),
|
Meta(Vec<FormatElement<'a>>),
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> Default for VariableValue<'a> {
|
impl Default for VariableValue<'_> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
VariableValue::Plain(Cow::Borrowed(""))
|
VariableValue::Plain(Cow::Borrowed(""))
|
||||||
}
|
}
|
||||||
@ -352,13 +352,13 @@ impl<'a> StringFormatter<'a> {
|
|||||||
variables
|
variables
|
||||||
.get(var.as_ref())
|
.get(var.as_ref())
|
||||||
// false if can't find the variable in format string
|
// false if can't find the variable in format string
|
||||||
.map_or(false, |map_result| {
|
.is_some_and(|map_result| {
|
||||||
let map_result = map_result.as_ref();
|
let map_result = map_result.as_ref();
|
||||||
map_result
|
map_result
|
||||||
.and_then(|result| result.as_ref().ok())
|
.and_then(|result| result.as_ref().ok())
|
||||||
// false if the variable is None or Err, or a meta variable
|
// false if the variable is None or Err, or a meta variable
|
||||||
// that shouldn't show
|
// that shouldn't show
|
||||||
.map_or(false, |result| match result {
|
.is_some_and(|result| match result {
|
||||||
// If the variable is a meta variable, also
|
// If the variable is a meta variable, also
|
||||||
// check the format string inside it.
|
// check the format string inside it.
|
||||||
VariableValue::Meta(meta_elements) => {
|
VariableValue::Meta(meta_elements) => {
|
||||||
@ -407,13 +407,13 @@ impl<'a> StringFormatter<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> VariableHolder<String> for StringFormatter<'a> {
|
impl VariableHolder<String> for StringFormatter<'_> {
|
||||||
fn get_variables(&self) -> BTreeSet<String> {
|
fn get_variables(&self) -> BTreeSet<String> {
|
||||||
self.variables.keys().cloned().collect()
|
self.variables.keys().cloned().collect()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> StyleVariableHolder<String> for StringFormatter<'a> {
|
impl StyleVariableHolder<String> for StringFormatter<'_> {
|
||||||
fn get_style_variables(&self) -> BTreeSet<String> {
|
fn get_style_variables(&self) -> BTreeSet<String> {
|
||||||
self.style_variables.keys().cloned().collect()
|
self.style_variables.keys().cloned().collect()
|
||||||
}
|
}
|
||||||
|
@ -177,7 +177,7 @@ impl<'a> Module<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> fmt::Display for Module<'a> {
|
impl fmt::Display for Module<'_> {
|
||||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||||
let ansi_strings = self.ansi_strings();
|
let ansi_strings = self.ansi_strings();
|
||||||
write!(f, "{}", AnsiStrings(&ansi_strings))
|
write!(f, "{}", AnsiStrings(&ansi_strings))
|
||||||
|
@ -340,7 +340,7 @@ fn to_fish_style(pwd_dir_length: usize, dir_string: &str, truncated_dir_string:
|
|||||||
|
|
||||||
/// Convert the path separators in `path` to the OS specific path separators.
|
/// Convert the path separators in `path` to the OS specific path separators.
|
||||||
fn convert_path_sep(path: &str) -> String {
|
fn convert_path_sep(path: &str) -> String {
|
||||||
return PathBuf::from_slash(path).to_string_lossy().into_owned();
|
PathBuf::from_slash(path).to_string_lossy().into_owned()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the path before the git repo root by trim the most right repo name.
|
/// Get the path before the git repo root by trim the most right repo name.
|
||||||
|
@ -17,7 +17,6 @@ const GLOBAL_JSON_FILE: &str = "global.json";
|
|||||||
const PROJECT_JSON_FILE: &str = "project.json";
|
const PROJECT_JSON_FILE: &str = "project.json";
|
||||||
|
|
||||||
/// A module which shows the latest (or pinned) version of the dotnet SDK
|
/// A module which shows the latest (or pinned) version of the dotnet SDK
|
||||||
|
|
||||||
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
|
||||||
let mut module = context.new_module("dotnet");
|
let mut module = context.new_module("dotnet");
|
||||||
let config = DotnetConfig::try_load(module.config);
|
let config = DotnetConfig::try_load(module.config);
|
||||||
@ -181,7 +180,7 @@ fn estimate_dotnet_version(
|
|||||||
/// - The root of the git repository
|
/// - The root of the git repository
|
||||||
/// (If there is one)
|
/// (If there is one)
|
||||||
fn try_find_nearby_global_json(current_dir: &Path, repo_root: Option<&Path>) -> Option<String> {
|
fn try_find_nearby_global_json(current_dir: &Path, repo_root: Option<&Path>) -> Option<String> {
|
||||||
let current_dir_is_repo_root = repo_root.map_or(false, |r| r == current_dir);
|
let current_dir_is_repo_root = repo_root == Some(current_dir);
|
||||||
let parent_dir = if current_dir_is_repo_root {
|
let parent_dir = if current_dir_is_repo_root {
|
||||||
// Don't scan the parent directory if it's above the root of a git repository
|
// Don't scan the parent directory if it's above the root of a git repository
|
||||||
None
|
None
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user