diff options
author | Hugues Morisset <morisset.hugues@gmail.com> | 2021-07-28 18:26:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-28 12:26:00 -0400 |
commit | 40cb667b9dab7fb9b7ea31a32e24013af2ed4e09 (patch) | |
tree | 85caa512a7d1a6295646114e4a36f5da395ee6fd /src/main.rs | |
parent | 2fa7f56cec447a029ac612f0ff12eb8605c963af (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/main.rs')
-rw-r--r-- | src/main.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index e1dff67d5..b24ef228b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -23,6 +23,13 @@ fn main() { .help("The status code of the previously run command") .takes_value(true); + let pipestatus_arg = Arg::with_name("pipestatus") + .long("pipestatus") + .value_name("PIPESTATUS") + .help("Status codes from a command pipeline") + .long_help("Bash and Zsh supports returning codes for each process in a pipeline.") + .multiple(true); + let path_arg = Arg::with_name("path") .short("p") .long("path") @@ -93,6 +100,7 @@ fn main() { SubCommand::with_name("prompt") .about("Prints the full starship prompt") .arg(&status_code_arg) + .arg(&pipestatus_arg) .arg(&path_arg) .arg(&logical_path_arg) .arg(&cmd_duration_arg) @@ -115,6 +123,7 @@ fn main() { .help("List out all supported modules"), ) .arg(&status_code_arg) + .arg(&pipestatus_arg) .arg(&path_arg) .arg(&logical_path_arg) .arg(&cmd_duration_arg) |