How to set path at locality of .autoenv.zsh?
sedlund opened this issue · comments
Scott Edlund commented
Hello,
I have /home/user/src/ansible/myProject/.autoenv.zsh that looks like this:
echo Setting environment variables...
autostash ANSIBLE_CONFIG=${PWD}/ansible.cfg
I want ${PWD} to be the path where the .autoenv.zsh is at in the tree.
If I cd deeper into the tree such as /home/user/src/ansible/myProject/roles/myrole/tasks
I still want ANSIBLE_CONFIG to be /home/user/src/ansible/myProject/ansible.cfg not:
/home/user/src/ansible/myProject/roles/myrole/tasks/ansible.cfg
Thanks!
Scott Edlund commented
I enabled debugging, and found the ${varstash_dir} variable. I've changed to use:
autostash ANSIBLE_CONFIG=${varstash_dir}/ansible.cfg
This seems to do what I want.