From 814dd4e44aef3c814ececaf3b9cb1e9b72dfe16e Mon Sep 17 00:00:00 2001 From: Jamie Bliss Date: Wed, 27 Jul 2016 14:45:09 -0400 Subject: [PATCH] Allow stacking of aliases, instead of clobbering --- README.md | 2 +- xontrib/avox.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c4e36f4..13774d7 100644 --- a/README.md +++ b/README.md @@ -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.
diff --git a/xontrib/avox.py b/xontrib/avox.py index 890f028..ab2d334 100644 --- a/xontrib/avox.py +++ b/xontrib/avox.py @@ -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""" @@ -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: