Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zsh error #12

Open
dvolgyes opened this issue Nov 30, 2022 · 4 comments
Open

zsh error #12

dvolgyes opened this issue Nov 30, 2022 · 4 comments
Assignees
Labels
feature Something that is not implemented yet

Comments

@dvolgyes
Copy link

Hi,

Great project. I started to play with it, and seems to work well in bash, but it fails immediately in Zsh.

> genv activate                     
_genv_backup_env:2: bad substitution

Probably you used a bash-specific idiom which doesn't work in Zsh.

As a generic advice, maybe running shellcheck could give you improvement ideas:
https://github.com/koalaman/shellcheck

@razrotenberg
Copy link
Contributor

Hi @dvolgyes and thanks for pointing it out!

We are aware of this issue.
This is because of the way we create some of the environment variables and especially because we use ! in parameter substitution here which is supported in bash but not in zsh where it's (P) instead.

For now, Genv officially supports only bash, and supporting more shells is for sure a task that needs to be done.
Also, zsh is probably the first one to add support to.

I have some poc of zsh support. I will see if I can make it work, I will create a branch and update you so that you could git checkout this branch and try it yourself.

What I recommend you is to use bash in the meantime and you can do it by running exec bash for example.

@razrotenberg razrotenberg self-assigned this Nov 30, 2022
@razrotenberg razrotenberg added the feature Something that is not implemented yet label Nov 30, 2022
@razrotenberg
Copy link
Contributor

Hi again @dvolgyes !

I published the branch with zsh support (feature/zsh).
I want to test it better before merging it to master.

Until then, you should checkout this branch in order to work with your zsh setup.
To do this, open your terminal and run the following:

cd ~/genv
git pull
git checkout feature/zsh

You should probably restart your shell for it to take effect.

It'd be great if you could use it in your zsh setup and provide feedback if it works properly or if something is not working right 🙃

@dvolgyes
Copy link
Author

dvolgyes commented Dec 1, 2022

Hi @razrotenberg ,

Thanks. I will try, but I am a bit busy with end of year deadlines, so I don't promise regular updates.
But I will try my best.

@razrotenberg
Copy link
Contributor

Hi @dvolgyes ,

Have you had some time to try the zsh support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something that is not implemented yet
Projects
None yet
Development

No branches or pull requests

2 participants