mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-28 07:46:28 +00:00
fix: Correct broken zsh init in absence of precmd_functions (#180)
This commit is contained in:
parent
dfe2ae643a
commit
572a07c72d
@ -152,6 +152,12 @@ starship_precmd() {
|
|||||||
starship_preexec(){
|
starship_preexec(){
|
||||||
STARSHIP_START_TIME="$(date +%s)"
|
STARSHIP_START_TIME="$(date +%s)"
|
||||||
};
|
};
|
||||||
|
if [[ -z "${precmd_functions+1}" ]]; then
|
||||||
|
precmd_functions=()
|
||||||
|
fi;
|
||||||
|
if [[ -z "${preexec_functions+1}" ]]; then
|
||||||
|
preexec_functions=()
|
||||||
|
fi;
|
||||||
if [[ ${precmd_functions[(ie)starship_precmd]} -gt ${#precmd_functions} ]]; then
|
if [[ ${precmd_functions[(ie)starship_precmd]} -gt ${#precmd_functions} ]]; then
|
||||||
precmd_functions+=(starship_precmd);
|
precmd_functions+=(starship_precmd);
|
||||||
fi;
|
fi;
|
||||||
|
Loading…
Reference in New Issue
Block a user