summaryrefslogtreecommitdiffstats
path: root/src/configs
diff options
context:
space:
mode:
authorChris Rose <offby1@offby1.net>2021-04-08 15:37:54 -0700
committerGitHub <noreply@github.com>2021-04-08 18:37:54 -0400
commit6817e7f6981d4cdd16367eec725e75bd6089d3a0 (patch)
tree37740b2c657e1094449010418fcf48af52699d90 /src/configs
parent1ff1f2b5dd4dd96abc16de914c2e4fcbaa41fb57 (diff)
feat: add version format configuration (#2499)
Diffstat (limited to 'src/configs')
-rw-r--r--src/configs/java.rs2
-rw-r--r--src/configs/nodejs.rs2
-rw-r--r--src/configs/python.rs2
-rw-r--r--src/configs/ruby.rs2
-rw-r--r--src/configs/rust.rs2
5 files changed, 10 insertions, 0 deletions
diff --git a/src/configs/java.rs b/src/configs/java.rs
index 6de40a686..20c28fd3d 100644
--- a/src/configs/java.rs
+++ b/src/configs/java.rs
@@ -7,6 +7,7 @@ use starship_module_config_derive::ModuleConfig;
pub struct JavaConfig<'a> {
pub disabled: bool,
pub format: &'a str,
+ pub version_format: &'a str,
pub style: &'a str,
pub symbol: &'a str,
pub detect_extensions: Vec<&'a str>,
@@ -18,6 +19,7 @@ impl<'a> Default for JavaConfig<'a> {
fn default() -> Self {
JavaConfig {
format: "via [$symbol($version )]($style)",
+ version_format: "v${raw}",
disabled: false,
style: "red dimmed",
symbol: "☕ ",
diff --git a/src/configs/nodejs.rs b/src/configs/nodejs.rs
index 741670e35..6d905069f 100644
--- a/src/configs/nodejs.rs
+++ b/src/configs/nodejs.rs
@@ -6,6 +6,7 @@ use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig, Serialize)]
pub struct NodejsConfig<'a> {
pub format: &'a str,
+ pub version_format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub disabled: bool,
@@ -19,6 +20,7 @@ impl<'a> Default for NodejsConfig<'a> {
fn default() -> Self {
NodejsConfig {
format: "via [$symbol($version )]($style)",
+ version_format: "v${raw}",
symbol: " ",
style: "bold green",
disabled: false,
diff --git a/src/configs/python.rs b/src/configs/python.rs
index a010411c1..1be75deae 100644
--- a/src/configs/python.rs
+++ b/src/configs/python.rs
@@ -9,6 +9,7 @@ pub struct PythonConfig<'a> {
pub pyenv_prefix: &'a str,
pub python_binary: VecOr<&'a str>,
pub format: &'a str,
+ pub version_format: &'a str,
pub style: &'a str,
pub symbol: &'a str,
pub disabled: bool,
@@ -24,6 +25,7 @@ impl<'a> Default for PythonConfig<'a> {
pyenv_prefix: "pyenv ",
python_binary: VecOr(vec!["python", "python3", "python2"]),
format: "via [${symbol}${pyenv_prefix}(${version} )(\\($virtualenv\\) )]($style)",
+ version_format: "v${raw}",
style: "yellow bold",
symbol: "🐍 ",
disabled: false,
diff --git a/src/configs/ruby.rs b/src/configs/ruby.rs
index f1940a85e..4ba0f057f 100644
--- a/src/configs/ruby.rs
+++ b/src/configs/ruby.rs
@@ -6,6 +6,7 @@ use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig, Serialize)]
pub struct RubyConfig<'a> {
pub format: &'a str,
+ pub version_format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub disabled: bool,
@@ -18,6 +19,7 @@ impl<'a> Default for RubyConfig<'a> {
fn default() -> Self {
RubyConfig {
format: "via [$symbol($version )]($style)",
+ version_format: "v${raw}",
symbol: "💎 ",
style: "bold red",
disabled: false,
diff --git a/src/configs/rust.rs b/src/configs/rust.rs
index 187e31182..a007fc5de 100644
--- a/src/configs/rust.rs
+++ b/src/configs/rust.rs
@@ -6,6 +6,7 @@ use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig, Serialize)]
pub struct RustConfig<'a> {
pub format: &'a str,
+ pub version_format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
pub disabled: bool,
@@ -18,6 +19,7 @@ impl<'a> Default for RustConfig<'a> {
fn default() -> Self {
RustConfig {
format: "via [$symbol($version )]($style)",
+ version_format: "v${raw}",
symbol: "🦀 ",
style: "bold red",
disabled: false,