Skip to content

Commit

Permalink
Allow stacking of aliases, instead of clobbering
Browse files Browse the repository at this point in the history
  • Loading branch information
AstraLuma committed Jul 27, 2016
1 parent 284a532 commit 814dd4e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# xontrib-avox
Xontrib for Xonsh that automatically activates and deactivates virtual environments as you `cd` around. It's based on the idea of projects and projects living in specific directories.

Warning: Incompatible with autoxsh due to cd aliasing.
Note: If you are using autoxsh, make sure to load avox after autoxsh.

<hr>

Expand Down
4 changes: 2 additions & 2 deletions xontrib/avox.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"""Automatic vox changer"""
import os as _os
import sys as _sys
import xonsh.dirstack as _dirstack
import xonsh.lazyasd as _lazyasd
import xontrib.voxapi as _voxapi

_old_cd = aliases['cd']

class _AvoxHandler:
"""Automatic vox"""
Expand Down Expand Up @@ -146,7 +146,7 @@ def cmd_help(self, args, stdin=None):
def cd_handler(cls, args, stdin=None):
self = cls()
oldve = self.vox.active()
rtn = _dirstack.cd(args, stdin)
rtn = _old_cd(args, stdin)
newve = self.env()
if oldve != newve:
if newve is None:
Expand Down

0 comments on commit 814dd4e

Please sign in to comment.