Add opam support.

master
Icedream 2022-06-15 17:10:31 +02:00
parent 772fed9938
commit 56c289a05a
Signed by: icedream
GPG Key ID: 468BBEEBB9EC6AEA
1 changed files with 8 additions and 0 deletions

View File

@ -23,6 +23,7 @@ ZSH_GCLOUD_FIXES=${ZSH_GCLOUD_FIXES:=$(when_binary_available gcloud)}
ZSH_GPG_PINENTRY_FIX=${ZSH_GPG_PINENTRY_FIX:-1} ZSH_GPG_PINENTRY_FIX=${ZSH_GPG_PINENTRY_FIX:-1}
ZSH_GPG_SSH_AGENT=${ZSH_GPG_SSH_AGENT:-$(has_binary gpgconf && [ -z "${SSH_AUTH_SOCK:-}" ] && [ -f $(gpgconf --list-dirs agent-ssh-socket) ] && printf 1 || printf 0)} ZSH_GPG_SSH_AGENT=${ZSH_GPG_SSH_AGENT:-$(has_binary gpgconf && [ -z "${SSH_AUTH_SOCK:-}" ] && [ -f $(gpgconf --list-dirs agent-ssh-socket) ] && printf 1 || printf 0)}
ZSH_LOGO_LS=${ZSH_LOGL_LS:-$(when_binary_available logo-ls)} ZSH_LOGO_LS=${ZSH_LOGL_LS:-$(when_binary_available logo-ls)}
ZSH_OPAM=${ZSH_OPAM:-$(when_binary_available opam)}
ZSH_PIPX=${ZSH_PIPX:-$(when_binary_available pipx)} ZSH_PIPX=${ZSH_PIPX:-$(when_binary_available pipx)}
ZSH_POWERLINE="${ZSH_POWERLINE:-1}" ZSH_POWERLINE="${ZSH_POWERLINE:-1}"
ZSH_PRESERVE_HISTORY="${ZSH_PRESERVE_HISTORY:-1}" ZSH_PRESERVE_HISTORY="${ZSH_PRESERVE_HISTORY:-1}"
@ -168,6 +169,13 @@ if [ $ZSH_SYNTAX_HIGHLIGHTING -gt 0 ]; then
fi fi
section_end section_end
# opam
section "opam"
if [ $ZSH_OPAM -gt 0 ]; then
[[ ! -r ~/.opam/opam-init/init.zsh ]] || source ~/.opam/opam-init/init.zsh >/dev/null 2>/dev/null
fi
section_end
# gcloud fixes # gcloud fixes
section "gcloud fixes" section "gcloud fixes"
if [ $ZSH_GCLOUD_FIXES -gt 0 ]; then if [ $ZSH_GCLOUD_FIXES -gt 0 ]; then