mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
style: use 'Self' to refer to own type (clippy::use_self) (#6735)
--------- Co-authored-by: daniel.eades <daniel.eades@seebyte.com>
This commit is contained in:
@@ -134,3 +134,6 @@ strip = false
|
||||
[[bin]]
|
||||
name = "starship"
|
||||
path = "src/main.rs"
|
||||
|
||||
[lints.clippy]
|
||||
use_self = "warn"
|
||||
|
||||
+1
-1
@@ -51,7 +51,7 @@ pub struct AwsConfig<'a> {
|
||||
|
||||
impl Default for AwsConfig<'_> {
|
||||
fn default() -> Self {
|
||||
AwsConfig {
|
||||
Self {
|
||||
format: "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)",
|
||||
symbol: "☁️ ",
|
||||
style: "bold yellow",
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct AzureConfig<'a> {
|
||||
|
||||
impl Default for AzureConfig<'_> {
|
||||
fn default() -> Self {
|
||||
AzureConfig {
|
||||
Self {
|
||||
format: "on [$symbol($subscription)]($style) ",
|
||||
symbol: " ",
|
||||
style: "blue bold",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct BatteryConfig<'a> {
|
||||
|
||||
impl Default for BatteryConfig<'_> {
|
||||
fn default() -> Self {
|
||||
BatteryConfig {
|
||||
Self {
|
||||
full_symbol: " ",
|
||||
charging_symbol: " ",
|
||||
discharging_symbol: " ",
|
||||
@@ -50,7 +50,7 @@ pub struct BatteryDisplayConfig<'a> {
|
||||
|
||||
impl Default for BatteryDisplayConfig<'_> {
|
||||
fn default() -> Self {
|
||||
BatteryDisplayConfig {
|
||||
Self {
|
||||
threshold: 10,
|
||||
style: "red bold",
|
||||
charging_symbol: None,
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct BufConfig<'a> {
|
||||
|
||||
impl Default for BufConfig<'_> {
|
||||
fn default() -> Self {
|
||||
BufConfig {
|
||||
Self {
|
||||
format: "with [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🐃 ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct BunConfig<'a> {
|
||||
|
||||
impl Default for BunConfig<'_> {
|
||||
fn default() -> Self {
|
||||
BunConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🥟 ",
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ pub type CConfig<'a> = CcConfig<'a, CConfigMarker>;
|
||||
|
||||
impl Default for CConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CcConfig {
|
||||
Self {
|
||||
marker: std::marker::PhantomData::<CConfigMarker>,
|
||||
|
||||
format: "via [$symbol($version(-$name) )]($style)",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct CharacterConfig<'a> {
|
||||
|
||||
impl Default for CharacterConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CharacterConfig {
|
||||
Self {
|
||||
format: "$symbol ",
|
||||
success_symbol: "[❯](bold green)",
|
||||
error_symbol: "[❯](bold red)",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct CMakeConfig<'a> {
|
||||
|
||||
impl Default for CMakeConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CMakeConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "△ ",
|
||||
|
||||
@@ -22,7 +22,7 @@ pub struct CmdDurationConfig<'a> {
|
||||
|
||||
impl Default for CmdDurationConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CmdDurationConfig {
|
||||
Self {
|
||||
min_time: 2_000,
|
||||
format: "took [$duration]($style) ",
|
||||
show_milliseconds: false,
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct CobolConfig<'a> {
|
||||
|
||||
impl Default for CobolConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CobolConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "⚙️ ",
|
||||
|
||||
@@ -19,7 +19,7 @@ pub struct CondaConfig<'a> {
|
||||
|
||||
impl Default for CondaConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CondaConfig {
|
||||
Self {
|
||||
truncation_length: 1,
|
||||
format: "via [$symbol$environment]($style) ",
|
||||
symbol: "🅒 ",
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct ContainerConfig<'a> {
|
||||
|
||||
impl Default for ContainerConfig<'_> {
|
||||
fn default() -> Self {
|
||||
ContainerConfig {
|
||||
Self {
|
||||
format: "[$symbol \\[$name\\]]($style) ",
|
||||
symbol: "⬢",
|
||||
style: "red bold dimmed",
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ pub type CppConfig<'a> = CcConfig<'a, CppConfigMarker>;
|
||||
|
||||
impl Default for CppConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CcConfig {
|
||||
Self {
|
||||
marker: std::marker::PhantomData::<CppConfigMarker>,
|
||||
|
||||
format: "via [$symbol($version(-$name) )]($style)",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct CrystalConfig<'a> {
|
||||
|
||||
impl Default for CrystalConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CrystalConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🔮 ",
|
||||
|
||||
@@ -35,7 +35,7 @@ pub struct CustomConfig<'a> {
|
||||
|
||||
impl Default for CustomConfig<'_> {
|
||||
fn default() -> Self {
|
||||
CustomConfig {
|
||||
Self {
|
||||
format: "[$symbol($output )]($style)",
|
||||
symbol: "",
|
||||
command: "",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct DamlConfig<'a> {
|
||||
|
||||
impl Default for DamlConfig<'_> {
|
||||
fn default() -> Self {
|
||||
DamlConfig {
|
||||
Self {
|
||||
symbol: "Λ ",
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct DartConfig<'a> {
|
||||
|
||||
impl Default for DartConfig<'_> {
|
||||
fn default() -> Self {
|
||||
DartConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🎯 ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct DenoConfig<'a> {
|
||||
|
||||
impl Default for DenoConfig<'_> {
|
||||
fn default() -> Self {
|
||||
DenoConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🦕 ",
|
||||
|
||||
@@ -30,7 +30,7 @@ pub struct DirectoryConfig<'a> {
|
||||
|
||||
impl Default for DirectoryConfig<'_> {
|
||||
fn default() -> Self {
|
||||
DirectoryConfig {
|
||||
Self {
|
||||
truncation_length: 3,
|
||||
truncate_to_repo: true,
|
||||
fish_style_pwd_dir_length: 0,
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct DockerContextConfig<'a> {
|
||||
|
||||
impl Default for DockerContextConfig<'_> {
|
||||
fn default() -> Self {
|
||||
DockerContextConfig {
|
||||
Self {
|
||||
symbol: "🐳 ",
|
||||
style: "blue bold",
|
||||
format: "via [$symbol$context]($style) ",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct DotnetConfig<'a> {
|
||||
|
||||
impl Default for DotnetConfig<'_> {
|
||||
fn default() -> Self {
|
||||
DotnetConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )(🎯 $tfm )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: ".NET ",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct ElixirConfig<'a> {
|
||||
|
||||
impl Default for ElixirConfig<'_> {
|
||||
fn default() -> Self {
|
||||
ElixirConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version \\(OTP $otp_version\\) )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "💧 ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct ElmConfig<'a> {
|
||||
|
||||
impl Default for ElmConfig<'_> {
|
||||
fn default() -> Self {
|
||||
ElmConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🌳 ",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct EnvVarConfig<'a> {
|
||||
|
||||
impl Default for EnvVarConfig<'_> {
|
||||
fn default() -> Self {
|
||||
EnvVarConfig {
|
||||
Self {
|
||||
symbol: "",
|
||||
style: "black bold dimmed",
|
||||
variable: None,
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct ErlangConfig<'a> {
|
||||
|
||||
impl Default for ErlangConfig<'_> {
|
||||
fn default() -> Self {
|
||||
ErlangConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: " ",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct FennelConfig<'a> {
|
||||
|
||||
impl Default for FennelConfig<'_> {
|
||||
fn default() -> Self {
|
||||
FennelConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🧅 ",
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ pub struct FillConfig<'a> {
|
||||
|
||||
impl Default for FillConfig<'_> {
|
||||
fn default() -> Self {
|
||||
FillConfig {
|
||||
Self {
|
||||
style: "bold black",
|
||||
symbol: ".",
|
||||
disabled: false,
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct FossilBranchConfig<'a> {
|
||||
|
||||
impl Default for FossilBranchConfig<'_> {
|
||||
fn default() -> Self {
|
||||
FossilBranchConfig {
|
||||
Self {
|
||||
format: "on [$symbol$branch]($style) ",
|
||||
symbol: " ",
|
||||
style: "bold purple",
|
||||
|
||||
@@ -17,7 +17,7 @@ pub struct FossilMetricsConfig<'a> {
|
||||
|
||||
impl Default for FossilMetricsConfig<'_> {
|
||||
fn default() -> Self {
|
||||
FossilMetricsConfig {
|
||||
Self {
|
||||
format: "([+$added]($added_style) )([-$deleted]($deleted_style) )",
|
||||
added_style: "bold green",
|
||||
deleted_style: "bold red",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct GcloudConfig<'a> {
|
||||
|
||||
impl Default for GcloudConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GcloudConfig {
|
||||
Self {
|
||||
format: "on [$symbol$account(@$domain)(\\($region\\))]($style) ",
|
||||
symbol: "☁️ ",
|
||||
style: "bold blue",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct GitBranchConfig<'a> {
|
||||
|
||||
impl Default for GitBranchConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GitBranchConfig {
|
||||
Self {
|
||||
format: "on [$symbol$branch(:$remote_branch)]($style) ",
|
||||
symbol: " ",
|
||||
style: "bold purple",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct GitCommitConfig<'a> {
|
||||
|
||||
impl Default for GitCommitConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GitCommitConfig {
|
||||
Self {
|
||||
// be consistent with git by default, which has DEFAULT_ABBREV set to 7
|
||||
commit_hash_length: 7,
|
||||
format: "[\\($hash$tag\\)]($style) ",
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct GitMetricsConfig<'a> {
|
||||
|
||||
impl Default for GitMetricsConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GitMetricsConfig {
|
||||
Self {
|
||||
added_style: "bold green",
|
||||
deleted_style: "bold red",
|
||||
only_nonzero_diffs: true,
|
||||
|
||||
@@ -22,7 +22,7 @@ pub struct GitStateConfig<'a> {
|
||||
|
||||
impl Default for GitStateConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GitStateConfig {
|
||||
Self {
|
||||
rebase: "REBASING",
|
||||
merge: "MERGING",
|
||||
revert: "REVERTING",
|
||||
|
||||
@@ -31,7 +31,7 @@ pub struct GitStatusConfig<'a> {
|
||||
|
||||
impl Default for GitStatusConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GitStatusConfig {
|
||||
Self {
|
||||
format: "([\\[$all_status$ahead_behind\\]]($style) )",
|
||||
style: "red bold",
|
||||
stashed: "\\$",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct GleamConfig<'a> {
|
||||
|
||||
impl Default for GleamConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GleamConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "⭐ ",
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ pub struct GoConfig<'a> {
|
||||
|
||||
impl Default for GoConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GoConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🐹 ",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct GradleConfig<'a> {
|
||||
|
||||
impl Default for GradleConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GradleConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🅶 ",
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct GuixShellConfig<'a> {
|
||||
|
||||
impl Default for GuixShellConfig<'_> {
|
||||
fn default() -> Self {
|
||||
GuixShellConfig {
|
||||
Self {
|
||||
format: "via [$symbol]($style) ",
|
||||
symbol: "🐃 ",
|
||||
style: "yellow bold",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct HaskellConfig<'a> {
|
||||
|
||||
impl Default for HaskellConfig<'_> {
|
||||
fn default() -> Self {
|
||||
HaskellConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "λ ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct HaxeConfig<'a> {
|
||||
|
||||
impl Default for HaxeConfig<'_> {
|
||||
fn default() -> Self {
|
||||
HaxeConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "⌘ ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct HelmConfig<'a> {
|
||||
|
||||
impl Default for HelmConfig<'_> {
|
||||
fn default() -> Self {
|
||||
HelmConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "⎈ ",
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct HgBranchConfig<'a> {
|
||||
|
||||
impl Default for HgBranchConfig<'_> {
|
||||
fn default() -> Self {
|
||||
HgBranchConfig {
|
||||
Self {
|
||||
symbol: " ",
|
||||
style: "bold purple",
|
||||
format: "on [$symbol$branch(:$topic)]($style) ",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct HostnameConfig<'a> {
|
||||
|
||||
impl Default for HostnameConfig<'_> {
|
||||
fn default() -> Self {
|
||||
HostnameConfig {
|
||||
Self {
|
||||
ssh_only: true,
|
||||
ssh_symbol: "🌐 ",
|
||||
trim_at: ".",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct JavaConfig<'a> {
|
||||
|
||||
impl Default for JavaConfig<'_> {
|
||||
fn default() -> Self {
|
||||
JavaConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
disabled: false,
|
||||
|
||||
+1
-1
@@ -19,7 +19,7 @@ pub struct JobsConfig<'a> {
|
||||
|
||||
impl Default for JobsConfig<'_> {
|
||||
fn default() -> Self {
|
||||
JobsConfig {
|
||||
Self {
|
||||
threshold: 1,
|
||||
symbol_threshold: 1,
|
||||
number_threshold: 2,
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct JuliaConfig<'a> {
|
||||
|
||||
impl Default for JuliaConfig<'_> {
|
||||
fn default() -> Self {
|
||||
JuliaConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "ஃ ",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct KotlinConfig<'a> {
|
||||
|
||||
impl Default for KotlinConfig<'_> {
|
||||
fn default() -> Self {
|
||||
KotlinConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🅺 ",
|
||||
|
||||
@@ -24,7 +24,7 @@ pub struct KubernetesConfig<'a> {
|
||||
|
||||
impl Default for KubernetesConfig<'_> {
|
||||
fn default() -> Self {
|
||||
KubernetesConfig {
|
||||
Self {
|
||||
symbol: "☸ ",
|
||||
format: "[$symbol$context( \\($namespace\\))]($style) in ",
|
||||
style: "cyan bold",
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct LocalipConfig<'a> {
|
||||
|
||||
impl Default for LocalipConfig<'_> {
|
||||
fn default() -> Self {
|
||||
LocalipConfig {
|
||||
Self {
|
||||
ssh_only: true,
|
||||
format: "[$localipv4]($style) ",
|
||||
style: "yellow bold",
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ pub struct LuaConfig<'a> {
|
||||
|
||||
impl Default for LuaConfig<'_> {
|
||||
fn default() -> Self {
|
||||
LuaConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🌙 ",
|
||||
|
||||
@@ -17,7 +17,7 @@ pub struct MemoryConfig<'a> {
|
||||
|
||||
impl Default for MemoryConfig<'_> {
|
||||
fn default() -> Self {
|
||||
MemoryConfig {
|
||||
Self {
|
||||
threshold: 75,
|
||||
format: "via $symbol[$ram( | $swap)]($style) ",
|
||||
style: "white bold dimmed",
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct MesonConfig<'a> {
|
||||
|
||||
impl Default for MesonConfig<'_> {
|
||||
fn default() -> Self {
|
||||
MesonConfig {
|
||||
Self {
|
||||
truncation_length: u32::MAX,
|
||||
truncation_symbol: "…",
|
||||
format: "via [$symbol$project]($style) ",
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ pub struct MojoConfig<'a> {
|
||||
|
||||
impl Default for MojoConfig<'_> {
|
||||
fn default() -> Self {
|
||||
MojoConfig {
|
||||
Self {
|
||||
format: "with [$symbol($version )]($style)",
|
||||
symbol: "🔥 ",
|
||||
style: "bold 208",
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ pub struct NatsConfig<'a> {
|
||||
|
||||
impl Default for NatsConfig<'_> {
|
||||
fn default() -> Self {
|
||||
NatsConfig {
|
||||
Self {
|
||||
format: "[$symbol($name )]($style)",
|
||||
symbol: "✉️ ",
|
||||
style: "bold purple",
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct NetnsConfig<'a> {
|
||||
|
||||
impl Default for NetnsConfig<'_> {
|
||||
fn default() -> Self {
|
||||
NetnsConfig {
|
||||
Self {
|
||||
format: "[$symbol \\[$name\\]]($style) ",
|
||||
symbol: "🛜",
|
||||
style: "blue bold dimmed",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct NimConfig<'a> {
|
||||
|
||||
impl Default for NimConfig<'_> {
|
||||
fn default() -> Self {
|
||||
NimConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "👑 ",
|
||||
|
||||
@@ -23,7 +23,7 @@ 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. */
|
||||
impl Default for NixShellConfig<'_> {
|
||||
fn default() -> Self {
|
||||
NixShellConfig {
|
||||
Self {
|
||||
format: "via [$symbol$state( \\($name\\))]($style) ",
|
||||
symbol: "❄️ ",
|
||||
style: "bold blue",
|
||||
|
||||
@@ -21,7 +21,7 @@ pub struct NodejsConfig<'a> {
|
||||
|
||||
impl Default for NodejsConfig<'_> {
|
||||
fn default() -> Self {
|
||||
NodejsConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: " ",
|
||||
|
||||
@@ -22,7 +22,7 @@ pub struct OCamlConfig<'a> {
|
||||
|
||||
impl Default for OCamlConfig<'_> {
|
||||
fn default() -> Self {
|
||||
OCamlConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )(\\($switch_indicator$switch_name\\) )]($style)",
|
||||
version_format: "v${raw}",
|
||||
global_switch_indicator: "",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct OdinConfig<'a> {
|
||||
|
||||
impl Default for OdinConfig<'_> {
|
||||
fn default() -> Self {
|
||||
OdinConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
show_commit: false,
|
||||
symbol: "Ø ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct OpaConfig<'a> {
|
||||
|
||||
impl Default for OpaConfig<'_> {
|
||||
fn default() -> Self {
|
||||
OpaConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🪖 ",
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct OspConfig<'a> {
|
||||
|
||||
impl Default for OspConfig<'_> {
|
||||
fn default() -> Self {
|
||||
OspConfig {
|
||||
Self {
|
||||
format: "on [$symbol$cloud(\\($project\\))]($style) ",
|
||||
symbol: "☁️ ",
|
||||
style: "bold yellow",
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ impl<'a> OSConfig<'a> {
|
||||
|
||||
impl Default for OSConfig<'_> {
|
||||
fn default() -> Self {
|
||||
OSConfig {
|
||||
Self {
|
||||
format: "[$symbol]($style)",
|
||||
style: "bold white",
|
||||
symbols: indexmap! {
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct PackageConfig<'a> {
|
||||
|
||||
impl Default for PackageConfig<'_> {
|
||||
fn default() -> Self {
|
||||
PackageConfig {
|
||||
Self {
|
||||
format: "is [$symbol$version]($style) ",
|
||||
symbol: "📦 ",
|
||||
style: "208 bold",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct PerlConfig<'a> {
|
||||
|
||||
impl Default for PerlConfig<'_> {
|
||||
fn default() -> Self {
|
||||
PerlConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🐪 ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct PhpConfig<'a> {
|
||||
|
||||
impl Default for PhpConfig<'_> {
|
||||
fn default() -> Self {
|
||||
PhpConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🐘 ",
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct PijulConfig<'a> {
|
||||
|
||||
impl Default for PijulConfig<'_> {
|
||||
fn default() -> Self {
|
||||
PijulConfig {
|
||||
Self {
|
||||
symbol: " ",
|
||||
style: "bold purple",
|
||||
format: "on [$symbol$channel]($style) ",
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ pub struct PixiConfig<'a> {
|
||||
|
||||
impl Default for PixiConfig<'_> {
|
||||
fn default() -> Self {
|
||||
PixiConfig {
|
||||
Self {
|
||||
pixi_binary: VecOr(vec!["pixi"]),
|
||||
show_default_environment: true,
|
||||
format: "via [$symbol($version )(\\($environment\\) )]($style)",
|
||||
|
||||
@@ -18,7 +18,7 @@ pub struct PulumiConfig<'a> {
|
||||
|
||||
impl Default for PulumiConfig<'_> {
|
||||
fn default() -> Self {
|
||||
PulumiConfig {
|
||||
Self {
|
||||
format: "via [$symbol($username@)$stack]($style) ",
|
||||
version_format: "v${raw}",
|
||||
symbol: " ",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct PureScriptConfig<'a> {
|
||||
|
||||
impl Default for PureScriptConfig<'_> {
|
||||
fn default() -> Self {
|
||||
PureScriptConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "<=> ",
|
||||
|
||||
@@ -26,7 +26,7 @@ pub struct PythonConfig<'a> {
|
||||
|
||||
impl Default for PythonConfig<'_> {
|
||||
fn default() -> Self {
|
||||
PythonConfig {
|
||||
Self {
|
||||
pyenv_version_name: false,
|
||||
pyenv_prefix: "pyenv ",
|
||||
python_binary: VecOr(vec",
|
||||
version_format: "v${raw}",
|
||||
symbol: "⨁ ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct RedConfig<'a> {
|
||||
|
||||
impl Default for RedConfig<'_> {
|
||||
fn default() -> Self {
|
||||
RedConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🔺 ",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct RLangConfig<'a> {
|
||||
|
||||
impl Default for RLangConfig<'_> {
|
||||
fn default() -> Self {
|
||||
RLangConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
style: "blue bold",
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ pub struct RubyConfig<'a> {
|
||||
|
||||
impl Default for RubyConfig<'_> {
|
||||
fn default() -> Self {
|
||||
RubyConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "💎 ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct RustConfig<'a> {
|
||||
|
||||
impl Default for RustConfig<'_> {
|
||||
fn default() -> Self {
|
||||
RustConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🦀 ",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct ScalaConfig<'a> {
|
||||
|
||||
impl Default for ScalaConfig<'_> {
|
||||
fn default() -> Self {
|
||||
ScalaConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
disabled: false,
|
||||
|
||||
@@ -28,7 +28,7 @@ pub struct ShellConfig<'a> {
|
||||
|
||||
impl Default for ShellConfig<'_> {
|
||||
fn default() -> Self {
|
||||
ShellConfig {
|
||||
Self {
|
||||
format: "[$indicator]($style) ",
|
||||
bash_indicator: "bsh",
|
||||
fish_indicator: "fsh",
|
||||
|
||||
@@ -19,7 +19,7 @@ pub struct ShLvlConfig<'a> {
|
||||
|
||||
impl Default for ShLvlConfig<'_> {
|
||||
fn default() -> Self {
|
||||
ShLvlConfig {
|
||||
Self {
|
||||
threshold: 2,
|
||||
format: "[$symbol$shlvl]($style) ",
|
||||
symbol: "↕️ ", // extra space for emoji
|
||||
|
||||
@@ -16,7 +16,7 @@ pub struct SingularityConfig<'a> {
|
||||
|
||||
impl Default for SingularityConfig<'_> {
|
||||
fn default() -> Self {
|
||||
SingularityConfig {
|
||||
Self {
|
||||
format: "[$symbol\\[$env\\]]($style) ",
|
||||
symbol: "",
|
||||
style: "blue bold dimmed",
|
||||
|
||||
@@ -23,7 +23,7 @@ pub struct SolidityConfig<'a> {
|
||||
|
||||
impl Default for SolidityConfig<'_> {
|
||||
fn default() -> Self {
|
||||
SolidityConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version)]($style)",
|
||||
symbol: "S ",
|
||||
style: "bold blue",
|
||||
|
||||
@@ -17,7 +17,7 @@ pub struct SpackConfig<'a> {
|
||||
|
||||
impl Default for SpackConfig<'_> {
|
||||
fn default() -> Self {
|
||||
SpackConfig {
|
||||
Self {
|
||||
truncation_length: 1,
|
||||
format: "via [$symbol$environment]($style) ",
|
||||
symbol: "🅢 ",
|
||||
|
||||
@@ -32,7 +32,7 @@ pub struct StatusConfig<'a> {
|
||||
|
||||
impl Default for StatusConfig<'_> {
|
||||
fn default() -> Self {
|
||||
StatusConfig {
|
||||
Self {
|
||||
format: "[$symbol$status]($style) ",
|
||||
symbol: "❌",
|
||||
success_symbol: "",
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ pub struct SudoConfig<'a> {
|
||||
|
||||
impl Default for SudoConfig<'_> {
|
||||
fn default() -> Self {
|
||||
SudoConfig {
|
||||
Self {
|
||||
format: "[as $symbol]($style)",
|
||||
symbol: "🧙 ",
|
||||
style: "bold blue",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct SwiftConfig<'a> {
|
||||
|
||||
impl Default for SwiftConfig<'_> {
|
||||
fn default() -> Self {
|
||||
SwiftConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "🐦 ",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct TerraformConfig<'a> {
|
||||
|
||||
impl Default for TerraformConfig<'_> {
|
||||
fn default() -> Self {
|
||||
TerraformConfig {
|
||||
Self {
|
||||
format: "via [$symbol$workspace]($style) ",
|
||||
version_format: "v${raw}",
|
||||
symbol: "💠 ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct TimeConfig<'a> {
|
||||
|
||||
impl Default for TimeConfig<'_> {
|
||||
fn default() -> Self {
|
||||
TimeConfig {
|
||||
Self {
|
||||
format: "at [$time]($style) ",
|
||||
style: "bold yellow",
|
||||
use_12hr: false,
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct TypstConfig<'a> {
|
||||
|
||||
impl Default for TypstConfig<'_> {
|
||||
fn default() -> Self {
|
||||
TypstConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "t ",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct UsernameConfig<'a> {
|
||||
|
||||
impl Default for UsernameConfig<'_> {
|
||||
fn default() -> Self {
|
||||
UsernameConfig {
|
||||
Self {
|
||||
detect_env_vars: vec![],
|
||||
format: "[$user]($style) in ",
|
||||
style_root: "red bold",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct VConfig<'a> {
|
||||
|
||||
impl Default for VConfig<'_> {
|
||||
fn default() -> Self {
|
||||
VConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "V ",
|
||||
|
||||
@@ -20,7 +20,7 @@ pub struct VagrantConfig<'a> {
|
||||
|
||||
impl Default for VagrantConfig<'_> {
|
||||
fn default() -> Self {
|
||||
VagrantConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "⍱ ",
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ pub struct VcshConfig<'a> {
|
||||
|
||||
impl Default for VcshConfig<'_> {
|
||||
fn default() -> Self {
|
||||
VcshConfig {
|
||||
Self {
|
||||
symbol: "",
|
||||
style: "bold yellow",
|
||||
format: "vcsh [$symbol$repo]($style) ",
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ pub struct ZigConfig<'a> {
|
||||
|
||||
impl Default for ZigConfig<'_> {
|
||||
fn default() -> Self {
|
||||
ZigConfig {
|
||||
Self {
|
||||
format: "via [$symbol($version )]($style)",
|
||||
version_format: "v${raw}",
|
||||
symbol: "↯ ",
|
||||
|
||||
+3
-3
@@ -109,7 +109,7 @@ impl<'a> Context<'a> {
|
||||
.or_else(|| env::var("PWD").map(PathBuf::from).ok())
|
||||
.unwrap_or_else(|| path.clone());
|
||||
|
||||
Context::new_with_shell_and_path(
|
||||
Self::new_with_shell_and_path(
|
||||
arguments,
|
||||
shell,
|
||||
target,
|
||||
@@ -162,7 +162,7 @@ impl<'a> Context<'a> {
|
||||
|
||||
let width = properties.terminal_width;
|
||||
|
||||
Context {
|
||||
Self {
|
||||
config,
|
||||
properties,
|
||||
current_dir,
|
||||
@@ -462,7 +462,7 @@ impl<'a> Context<'a> {
|
||||
|
||||
impl Default for Context<'_> {
|
||||
fn default() -> Self {
|
||||
Context::new(Default::default(), Target::Main)
|
||||
Self::new(Default::default(), Target::Main)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,13 +34,13 @@ pub enum StyleElement<'a> {
|
||||
impl<'a> VariableHolder<Cow<'a, str>> for FormatElement<'a> {
|
||||
fn get_variables(&self) -> BTreeSet<Cow<'a, str>> {
|
||||
match self {
|
||||
FormatElement::Variable(var) => {
|
||||
Self::Variable(var) => {
|
||||
let mut variables = BTreeSet::new();
|
||||
variables.insert(var.clone());
|
||||
variables
|
||||
}
|
||||
FormatElement::TextGroup(textgroup) => textgroup.format.get_variables(),
|
||||
FormatElement::Conditional(format) => format.get_variables(),
|
||||
Self::TextGroup(textgroup) => textgroup.format.get_variables(),
|
||||
Self::Conditional(format) => format.get_variables(),
|
||||
_ => Default::default(),
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ impl<'a> VariableHolder<Cow<'a, str>> for &[FormatElement<'a>] {
|
||||
impl<'a> StyleVariableHolder<Cow<'a, str>> for StyleElement<'a> {
|
||||
fn get_style_variables(&self) -> BTreeSet<Cow<'a, str>> {
|
||||
match self {
|
||||
StyleElement::Variable(var) => {
|
||||
Self::Variable(var) => {
|
||||
let mut variables = BTreeSet::new();
|
||||
variables.insert(var.clone());
|
||||
variables
|
||||
|
||||
@@ -22,7 +22,7 @@ enum VariableValue<'a> {
|
||||
|
||||
impl Default for VariableValue<'_> {
|
||||
fn default() -> Self {
|
||||
VariableValue::Plain(Cow::Borrowed(""))
|
||||
Self::Plain(Cow::Borrowed(""))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -133,7 +133,7 @@ impl<'a> Module<'a> {
|
||||
desc: impl Into<String>,
|
||||
config: Option<&'a toml::Value>,
|
||||
) -> Self {
|
||||
Module {
|
||||
Self {
|
||||
config,
|
||||
name: name.into(),
|
||||
description: desc.into(),
|
||||
|
||||
@@ -373,8 +373,8 @@ impl GitDiff {
|
||||
let deleted_re = Regex::new(r"(\d+) \w+\(\-\)").unwrap();
|
||||
|
||||
Self {
|
||||
added: GitDiff::get_matched_str(diff, &added_re).to_owned(),
|
||||
deleted: GitDiff::get_matched_str(diff, &deleted_re).to_owned(),
|
||||
added: Self::get_matched_str(diff, &added_re).to_owned(),
|
||||
deleted: Self::get_matched_str(diff, &deleted_re).to_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user