diff options
Diffstat (limited to 'src/init.rs')
-rw-r--r-- | src/init.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/init.rs b/src/init.rs index 4fb6882ef..f0e8bd42a 100644 --- a/src/init.rs +++ b/src/init.rs @@ -187,7 +187,7 @@ starship_precmd() { STATUS=$? # Compute cmd_duration, if we have a time to consume - if [[ $STARSHIP_START_TIME ]]; then + if [[ ! -z "${STARSHIP_START_TIME+1}" ]]; then STARSHIP_END_TIME="$(date +%s)" STARSHIP_DURATION=$((STARSHIP_END_TIME - STARSHIP_START_TIME)) PROMPT="$(starship prompt --status=$STATUS --cmd-duration=$STARSHIP_DURATION --jobs="$(jobs | wc -l)")" |