mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
fix: Correct ZSH init on older ZSH versions (#213)
This commit is contained in:
committed by
Matan Kushner
parent
dcb78a4e0b
commit
f06247d5d3
+1
-1
@@ -187,7 +187,7 @@ starship_precmd() {
|
|||||||
STATUS=$?
|
STATUS=$?
|
||||||
|
|
||||||
# Compute cmd_duration, if we have a time to consume
|
# 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_END_TIME="$(date +%s)"
|
||||||
STARSHIP_DURATION=$((STARSHIP_END_TIME - STARSHIP_START_TIME))
|
STARSHIP_DURATION=$((STARSHIP_END_TIME - STARSHIP_START_TIME))
|
||||||
PROMPT="$(starship prompt --status=$STATUS --cmd-duration=$STARSHIP_DURATION --jobs="$(jobs | wc -l)")"
|
PROMPT="$(starship prompt --status=$STATUS --cmd-duration=$STARSHIP_DURATION --jobs="$(jobs | wc -l)")"
|
||||||
|
|||||||
Reference in New Issue
Block a user