summaryrefslogtreecommitdiffstats
path: root/src/configs/status.rs
diff options
context:
space:
mode:
authorHugues Morisset <morisset.hugues@gmail.com>2021-07-28 18:26:00 +0200
committerGitHub <noreply@github.com>2021-07-28 12:26:00 -0400
commit40cb667b9dab7fb9b7ea31a32e24013af2ed4e09 (patch)
tree85caa512a7d1a6295646114e4a36f5da395ee6fd /src/configs/status.rs
parent2fa7f56cec447a029ac612f0ff12eb8605c963af (diff)
feat(status): Add pipestatus display in status module (#2481)
* feat: Add pipestatus display in status module This MR is based on this one https://github.com/starship/starship/pull/370 * Documentation * Add a test with map_symbol false * Handle bash preexec pipestatus * Add zsh support * Add fish support Thanks kidonng for the diff patch * Rename sucess_symbol to success_symbol
Diffstat (limited to 'src/configs/status.rs')
-rw-r--r--src/configs/status.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/configs/status.rs b/src/configs/status.rs
index 5673793a3..dda5f8191 100644
--- a/src/configs/status.rs
+++ b/src/configs/status.rs
@@ -7,6 +7,7 @@ use starship_module_config_derive::ModuleConfig;
pub struct StatusConfig<'a> {
pub format: &'a str,
pub symbol: &'a str,
+ pub success_symbol: &'a str,
pub not_executable_symbol: &'a str,
pub not_found_symbol: &'a str,
pub sigint_symbol: &'a str,
@@ -14,6 +15,9 @@ pub struct StatusConfig<'a> {
pub style: &'a str,
pub map_symbol: bool,
pub recognize_signal_code: bool,
+ pub pipestatus: bool,
+ pub pipestatus_separator: &'a str,
+ pub pipestatus_format: &'a str,
pub disabled: bool,
}
@@ -22,6 +26,7 @@ impl<'a> Default for StatusConfig<'a> {
StatusConfig {
format: "[$symbol$status]($style) ",
symbol: "✖",
+ success_symbol: "✔️",
not_executable_symbol: "🚫",
not_found_symbol: "🔍",
sigint_symbol: "🧱",
@@ -29,6 +34,10 @@ impl<'a> Default for StatusConfig<'a> {
style: "bold red",
map_symbol: false,
recognize_signal_code: true,
+ pipestatus: false,
+ pipestatus_separator: "|",
+ pipestatus_format:
+ "\\[$pipestatus\\] => [$symbol$common_meaning$signal_name$maybe_int]($style)",
disabled: true,
}
}