get zimfw if missing

Similar to https://github-wiki-see.page/m/junegunn/vim-plug/wiki/tips
This commit is contained in:
Enno 2021-10-26 08:22:07 +02:00 committed by GitHub
parent a86f69a2f1
commit da879b8336
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -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
```
</details>
Usage