Tarrasch / zsh-autoenv

Autoenv for zsh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to set path at locality of .autoenv.zsh?

sedlund opened this issue · comments

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!

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.