Skip to content

How do I use $VARIABLES in my .zsh_plugins.txt file? #75

Answered by mattmc3
mattmc3 asked this question in Q&A
Discussion options

You must be logged in to vote

The tool you want is envsubst. You can run your ~/.zsh_plugins.txt through it and pipe the results to antidote bundle.

.zsh_plugins.txt

# reference your own plugins
$ZDOTDIR/custom/plugins/nodejs
$ZDOTDIR/custom/plugins/python
$ZDOTDIR/custom/plugins/ruby

.zshrc

zsh_plugins=${ZDOTDIR:-~}/.zsh_plugins.txt
envsubst <${zsh_plugins} | antidote bundle >${zsh_plugins:r}.zsh

This shows the output:

$ envsubst <${zsh_plugins} | antidote bundle
fpath+=( /Users/mattmc3/.zsh/custom/plugins/nodejs )
source /Users/mattmc3/.zsh/custom/plugins/nodejs/nodejs.plugin.zsh
fpath+=( /Users/mattmc3/.zsh/custom/plugins/python )
source /Users/mattmc3/.zsh/custom/plugins/python/python.plugin.zsh
fpath+=( /Users/m…

Replies: 1 comment

Comment options

mattmc3
Sep 19, 2022
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by mattmc3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant