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

Already on GitHub? Sign in to your account

Add autoenv plugin, which adopts using Kenneth Reitz's autoenv. #1565

Merged
merged 1 commit into from Apr 24, 2013

Conversation

Projects
None yet
3 participants
Contributor

serdardalgic commented Jan 25, 2013

Hi,

I've added a plugin for using autoenv. When cd'ed into a directory, autoenv checks whether there is an .env file in this directory; if there is one it executes the contents of this .env file.

This commit changes the overridden cd () in lib/directories.zsh. The plugin assumes autoenv is installed under ~/.autoenv a.k.a autoenv is git checked-out to .autoenv. I'm open to any suggestions about that.

The use_env function in the plugin is used to auto-activate virtualenv and needs virtualenvwrapper. The code is taken from https://github.com/kennethreitz/autoenv/wiki/Cookbook

For the autoenv users, I think this plugin would help much. I'd be pleased if you merge the code into master branch. I'd also appreciate any comments on how to improve the code.

Peace!

-Serdar

Contributor

serdardalgic commented Jan 25, 2013

For the Plugins wiki page, this section can be added:

=== autoenv ===
This plugin assumes you installed autoenv to ~/.autoenv directory. It includes the auto-activate virtualenv code which needs virtualenvwrapper.

Contributor

serdardalgic commented Feb 14, 2013

Ping? Any comments(positive or negative) on this plugin?

ahmetb commented Mar 3, 2013

Here is my feedback: I'm using homebrew and pip, so assuming autoenv is installed under ~/.autoenv is not useful since none of these package managers do so. Does it give any errors if it can't locate the installation? (haven't tried it yet but the plugin source does not say so as far as I read).

I guess pip has it under /usr/local/bin/activate.sh and homebrew has it under /usr/local/opt/autoenv/activate.sh so maybe a fallback logic would handle it better.

Contributor

serdardalgic commented Mar 31, 2013

Sorry for replying back that late. @ahmetalpbalkan Yeah, you're right. I'll take a look at it asap.

robbyrussell added a commit that referenced this pull request Apr 24, 2013

Merge pull request #1565 from serdardalgic/autoenv-plugin
Add autoenv plugin, which adopts using Kenneth Reitz's autoenv.

@robbyrussell robbyrussell merged commit 685c746 into robbyrussell:master Apr 24, 2013

Owner

robbyrussell commented Apr 24, 2013

@serdardalgic took this as is... get some users... make it better as necessary!

w31 pushed a commit to w31/oh-my-zsh that referenced this pull request Apr 30, 2014

Merge pull request #1565 from serdardalgic/autoenv-plugin
Add autoenv plugin, which adopts using Kenneth Reitz's autoenv.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment