From da879b83367caf5505f6eaf36004013808d12786 Mon Sep 17 00:00:00 2001 From: Enno Date: Tue, 26 Oct 2021 08:22:07 +0200 Subject: [PATCH] get zimfw if missing Similar to https://github-wiki-see.page/m/junegunn/vim-plug/wiki/tips --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index c47706f..5dd31da 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,17 @@ you can add to your `~/.zimrc`. zsh ~/.zim/zimfw.zsh install + As an alternative to the last two steps, add additionally the following lines to `~/.zshenv` to + automatically install zimfw whenenver it is missing: + + ```zsh +export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim +if ! [ -s "$ZIM_HOME/zimfw.zsh" ]; then + curl --fail --show-error --silent --location --output "$ZIM_HOME/zimfw.zsh" https://github.com/zimfw/zimfw/releases/latest/download/zimfw.zsh && + chmod 0755 "$ZIM_HOME/zimfw.zsh" && + zsh "$ZIM_HOME/zimfw.zsh" install +fi +``` Usage