Getting started with 1Password for your growing team, or refining your setup? Our Secured Success quickstart guide is for you.
Forum Discussion
Former Member
3 years ago1P Zsh plugins no loading for shell script
Is there a documented way to make sure the 1P plugins load when invoking a shell script?
I use Zsh and have source d the plugins on shell load such that this works fine in an interactive window: ...
Former Member
3 years agoHey @bradical , thank you for reaching out to us!
This is a known limitation of the shell plugins, and getting these to work in scripts and non-interactive calls is definitely on our roadmap!
In the meantime, there are some workarounds that you can use:
* export the alias directly in your script - begin your script with alias aws=op plugin run -- aws
* source the plugins.sh
file in your script - in your zshrc or bashrc or config file, you will find a statement such as source ~/.op/plugins.sh
. Including the same statement at the beginning of your script will make sure that all your configured aliases are available in there too.
Hope these solutions will work, as a stopgap. We'll keep posted with any developments around this! Let us know if we can help with anything else.
Best,
Horia