diff options
-rw-r--r-- | README.md | 17 | ||||
-rwxr-xr-x | powerlevel9k.zsh-theme | 9 |
2 files changed, 18 insertions, 8 deletions
@@ -129,6 +129,7 @@ The segments that are currently available are: * [`chruby`](#chruby) - Ruby environment information using `chruby` (if one is active). * [`rbenv`](#rbenv) - Ruby environment information using `rbenv` (if one is active). * [`rspec_stats`](#rspec_stats) - Show a ratio of test classes vs code classes for RSpec. + * `rvm` - Ruby environment information using `$GEM_HOME` and `$MY_RUBY_HOME` (if one is active). * **Rust Segments:** * `rust_version` - Display the current rust version and [logo](https://www.rust-lang.org/logos/rust-logo-blk.svg). * **Swift Segments:** @@ -209,8 +210,10 @@ You can also change the battery icon automatically depending on the battery level. This will override the default battery icon. In order to do this, you need to define the `POWERLEVEL9k_BATTERY_STAGES` variable. -| Variable | Default Value | Description | -| `POWERLEVEL9K_BATTERY_STAGES`|Unset|A string or array, which each index indicates a charge level.| + +| Variable | Default Value | Description | +|-------------------------------|---------------|---------------------------------------------------------------| +| `POWERLEVEL9K_BATTERY_STAGES` | Unset | A string or array, which each index indicates a charge level. | Powerlevel9k will use each index of the string or array as a stage to indicate battery charge level, progressing from left to right. You can provide any number of @@ -250,10 +253,12 @@ As with the battery stages, you can use any number of colors and Powerlevel9k will automatically use all of them appropriately. Some example settings: -|Brightness|Possible Array| -|Bright Colors|(196 202 208 214 220 226 190 154 118 82 46)| -|Normal Colors|(124 130 136 142 148 112 76 40 34 28 22)| -|Subdued Colors|( 88 94 100 106 70 34 28 22)| + +| Brightness | Possible Array | +|----------------|-------------------------------------------------| +| Bright Colors | `(196 202 208 214 220 226 190 154 118 82 46)` | +| Normal Colors | `(124 130 136 142 148 112 76 40 34 28 22)` | +| Subdued Colors | `( 88 94 100 106 70 34 28 22)` | ##### command_execution_time diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 12d05db3..1d34f344 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1165,8 +1165,13 @@ prompt_status() { local ec if [[ $POWERLEVEL9K_STATUS_SHOW_PIPESTATUS == true ]]; then - ec_text=$(exit_code_or_status "${RETVALS[1]}") - ec_sum=${RETVALS[1]} + if (( $#RETVALS > 1 )); then + ec_text=$(exit_code_or_status "${RETVALS[1]}") + ec_sum=${RETVALS[1]} + else + ec_text=$(exit_code_or_status "${RETVAL}") + ec_sum=${RETVAL} + fi for ec in "${(@)RETVALS[2,-1]}"; do ec_text="${ec_text}|$(exit_code_or_status "$ec")" |