Files
zsh/88-prompt.zsh
Andrey Astafyev 8b06929bc2 рефакторинг(zsh): улучшить стабильность Zsh при запуске
*   Добавлены проверки минимальной версии Zsh для повышения надежности
*   Оптимизирована логика загрузки Powerlevel10k
*   Внедрена быстрая проверка Starship
2026-04-11 14:34:02 +03:00

27 lines
622 B
Bash

# shellcheck shell=bash
# vim: ft=sh
if ! is-at-least 5.8; then
zinit light agkozak/agkozak-zsh-prompt
return
fi
if command -v starship >/dev/null; then
eval "$(starship init zsh)"
return
fi
zinit ice depth"1" # git clone depth
zinit light romkatv/powerlevel10k
# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
if [[ -r "$ZDOTDIR/.p10k.user.zsh" ]]; then
source "$ZDOTDIR/.p10k.user.zsh"
else
if [[ "$TERM" = "xterm" ]]; then
[[ -r "$ZDOTDIR/.p10k.8colors.zsh" ]] && source "$ZDOTDIR/.p10k.8colors.zsh"
else
[[ -r "$ZDOTDIR/.p10k.zsh" ]] && source "$ZDOTDIR/.p10k.zsh"
fi
fi