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

Error if path contains spaces #39

Closed
jfsantos opened this issue Nov 19, 2015 · 2 comments
Closed

Error if path contains spaces #39

jfsantos opened this issue Nov 19, 2015 · 2 comments
Labels

Comments

@jfsantos
Copy link

I am using zsh-autoenv on OS X and it breaks if the path where the .autoenv.zsh file is saved contains spaces. The error message is the following:

cd ~/test\ folder
_autoenv_authorized_env_file:local:2: not valid in this context: folder/.autoenv.zsh:423624aee303faed668094684c5156df46d491a2:1

I tried adding quotes around $1 in the _autoenv_autorized_env_file definition in autoenv.zsh, but it does not make any difference. I also tried using ${(q)env_file} instead of $env_file when calling _autoenv_hash_pair, but then it complains about a missing file argument for the function.

@blueyed
Copy link
Collaborator

blueyed commented Nov 19, 2015

I tried adding quotes

The error is in the 2nd line. Try: local pair="$(_autoenv_hash_pair $env_file)"

Which Zsh version are you using?
What is the output of setopt?
(looks similar to #38)

@blueyed blueyed added the bug label Nov 19, 2015
@jfsantos
Copy link
Author

I'm running Zsh 5.0.8, and I don't have the shwordsplit option enabled, but adding quotes to the second line worked.

blueyed added a commit to blueyed/zsh-autoenv that referenced this issue Dec 14, 2017
As a side-effect this should fix
Tarrasch#39 in case it was still
an issue after all.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants