Skip to content

Commit 9961061

Browse files
committed
Merged in kdeldycke/virtualenvwrapper/kdeldycke/restore-overridden-cd-command-to-its-def-1435073839852 (pull request #34)
Restore overridden cd command to its default builtin behaviour.
2 parents 92a4116 + ca7ca2a commit 9961061

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/source/tips.rst

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Via `mae <http://www.blogger.com/profile/10879711379090472478>`__:
117117
This is supposed to be executed after workon, that is as a
118118
``postactivate`` hook. It basically overrides ``cd`` to know about the
119119
VENV so instead of doing ``cd`` to go to ``~`` you will go to the venv
120-
root, IMO very handy and I can't live without it anymore. if you pass
120+
root, IMO very handy and I can't live without it anymore. If you pass
121121
it a proper path then it will do the right thing.
122122

123123
::
@@ -132,3 +132,12 @@ it a proper path then it will do the right thing.
132132
}
133133

134134
cd
135+
136+
And to finally restore the default behaviour of ``cd`` once you
137+
bailout of a VENV via a ``deactivate`` command, you need to add this
138+
as a ``postdeactivate`` hook (`source
139+
<http://github.com/kdeldycke/dotfiles/commit/80470b>`_)::
140+
141+
cd () {
142+
builtin cd "$@"
143+
}

0 commit comments

Comments
 (0)