ZPLUG-IF(5)
π zplug-if π
okay bestie, welcome to the zplug-if page β this is section 5 of the ZPLUG Manual, and it's all about the if tag and when a package gets to install / get used. it's giving "conditional queen" energy β¨
πΈ NAME πΈ
zplug-if β the conditions under which to install and/or use the package π
π¦ SYNOPSIS π¦
zplug "username/reponame", if:(( $+commands[git] ))
ngl, quick vocab check before we go any further: the word package here means a string in this exact format: "username/reponame". that's it, that's the whole definition π
π DESCRIPTION π
so here's the tea: when you use the if tag, you get to decide whether the package you want to install will be installed as the plugin or as the command. you're literally picking its whole destiny. main character choice fr fr.
Table 1. zplug if tag β the vibe check:
- possible values:
plugin,commandπ - default value:
pluginβ¨
and bestie, if you don't like the default, you can change it with the zstyle command:
$ zstyle ":zplug:tag" if "[[ $OSTYPE == *darwin* ]]"
slay. now the default matches your rules, not the manpage's rules π
π EXAMPLES π
load it if the local directory exists β like, only show up if the party's already happening:
$ zplug "~/.zsh" \
from:local, \
use:"*.{sh,zsh}", \
if:"[ -d ~/.zsh ]"
obsessed. if:"[ -d ~/.zsh ]" is doing the whole bouncer-at-the-door thing and we respect it π«Ά
π₯ SEE ALSO π₯
π§ FURTHER DOCUMENTATION π§
see the references in the official wiki page to get started using zplug. and lowkey? the wiki may perhaps be overwhelming for first-time users β not a skill issue, it's just a lot, okay?? take your time, babe π
π AUTHORS π
zplug was originally written by Masaki Ishiyama (a.k.a @b4b4r07). many people have contributed to it β a whole squad, iconic π
π COPYING π
Copyright (C) 2015-2016 Masaki Ishiyama
MIT License
π REPORTING BUGS π
report bugs to the zplug issues β don't suffer in silence bestie, tell the maintainers π
okay that's the whole page!! written up in the ZPLUG Manual, dated 11/21/2016, filed under ZPLUG-IF(5) β go forth and use your if tags wisely, mwah π
πβ¨
π¦ where this page comes from
- debian bookworm: zplug 2.4.2-2 Β· MIT
- debian trixie: zplug 2.4.2-2 Β· MIT
- nixpkgs unstable: zplug 2.4.2
- ubuntu jammy: zplug 2.4.2-1 Β· MIT
- ubuntu noble: zplug 2.4.2-2 Β· MIT
- ubuntu resolute: zplug 2.4.2-3 Β· MIT
- ubuntu stonking: zplug 2.4.2-3 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms